Update to Linux 2.6.16-rc1-git4.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 2 Feb 2006 19:16:38 +0000 (19:16 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Thu, 2 Feb 2006 19:16:38 +0000 (19:16 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
--HG--
rename : patches/linux-2.6.15/i386-mach-io-check-nmi.patch => patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.15/net-csum.patch => patches/linux-2.6.16-rc1-git4/net-csum.patch
rename : patches/linux-2.6.15/pmd-shared.patch => patches/linux-2.6.16-rc1-git4/pmd-shared.patch
rename : patches/linux-2.6.15/smp-alts.patch => patches/linux-2.6.16-rc1-git4/smp-alts.patch

138 files changed:
buildconfigs/Rules.mk
buildconfigs/linux-defconfig_xen0_x86_32
buildconfigs/linux-defconfig_xen0_x86_64
buildconfigs/linux-defconfig_xenU_x86_32
buildconfigs/linux-defconfig_xenU_x86_64
buildconfigs/linux-defconfig_xen_x86_32
buildconfigs/linux-defconfig_xen_x86_64
buildconfigs/mk.linux-2.6-xen
linux-2.6-xen-sparse/arch/i386/Kconfig
linux-2.6-xen-sparse/arch/i386/Makefile
linux-2.6-xen-sparse/arch/i386/kernel/Makefile
linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/apic-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
linux-2.6-xen-sparse/arch/i386/kernel/init_task-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c
linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c
linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c
linux-2.6-xen-sparse/arch/i386/kernel/traps.c
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c
linux-2.6-xen-sparse/arch/ia64/Kconfig
linux-2.6-xen-sparse/arch/ia64/Makefile
linux-2.6-xen-sparse/arch/ia64/kernel/entry.S
linux-2.6-xen-sparse/arch/ia64/kernel/head.S
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre
linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c
linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S
linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S
linux-2.6-xen-sparse/arch/x86_64/Kconfig
linux-2.6-xen-sparse/arch/x86_64/Makefile
linux-2.6-xen-sparse/arch/x86_64/ia32/Makefile
linux-2.6-xen-sparse/arch/x86_64/ia32/ia32entry-xen.S
linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-int80.S
linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-sigreturn.S
linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile
linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/early_printk-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S
linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/vsyscall-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c
linux-2.6-xen-sparse/arch/x86_64/mm/Makefile
linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c
linux-2.6-xen-sparse/drivers/Kconfig
linux-2.6-xen-sparse/drivers/Makefile
linux-2.6-xen-sparse/drivers/acpi/Kconfig
linux-2.6-xen-sparse/drivers/acpi/tables.c
linux-2.6-xen-sparse/drivers/char/mem.c
linux-2.6-xen-sparse/drivers/char/tpm/Makefile
linux-2.6-xen-sparse/drivers/char/tpm/tpm.c
linux-2.6-xen-sparse/drivers/char/tpm/tpm.h
linux-2.6-xen-sparse/drivers/char/tty_io.c
linux-2.6-xen-sparse/drivers/serial/Kconfig
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
linux-2.6-xen-sparse/drivers/xen/char/mem.c
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
linux-2.6-xen-sparse/fs/Kconfig
linux-2.6-xen-sparse/include/asm-i386/atomic.h
linux-2.6-xen-sparse/include/asm-i386/bitops.h
linux-2.6-xen-sparse/include/asm-i386/futex.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/dma-mapping.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/io.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/ptrace.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h
linux-2.6-xen-sparse/include/asm-i386/system.h
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h
linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h
linux-2.6-xen-sparse/include/asm-ia64/pal.h
linux-2.6-xen-sparse/include/asm-ia64/processor.h
linux-2.6-xen-sparse/include/asm-ia64/system.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/dma-mapping.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/fixmap.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/io.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/segment.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h
linux-2.6-xen-sparse/include/linux/gfp.h
linux-2.6-xen-sparse/include/linux/irq.h
linux-2.6-xen-sparse/include/linux/mm.h
linux-2.6-xen-sparse/include/linux/skbuff.h
linux-2.6-xen-sparse/include/xen/xenbus.h
linux-2.6-xen-sparse/kernel/irq/manage.c
linux-2.6-xen-sparse/lib/Kconfig.debug
linux-2.6-xen-sparse/mm/Kconfig
linux-2.6-xen-sparse/mm/memory.c
linux-2.6-xen-sparse/mm/mmap.c
linux-2.6-xen-sparse/mm/page_alloc.c
linux-2.6-xen-sparse/net/core/dev.c
linux-2.6-xen-sparse/net/core/skbuff.c
patches/linux-2.6.15/i386-mach-io-check-nmi.patch [deleted file]
patches/linux-2.6.15/net-csum.patch [deleted file]
patches/linux-2.6.15/pmd-shared.patch [deleted file]
patches/linux-2.6.15/smp-alts.patch [deleted file]
patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch [new file with mode: 0644]
patches/linux-2.6.16-rc1-git4/net-csum.patch [new file with mode: 0644]
patches/linux-2.6.16-rc1-git4/pmd-shared.patch [new file with mode: 0644]
patches/linux-2.6.16-rc1-git4/smp-alts.patch [new file with mode: 0644]

index 60b4024ae8a9ff477364ceefd63f6e719d615ec3..84a341c177aae8e7f719db6d763404f57a86636d 100644 (file)
@@ -26,6 +26,7 @@ LINUX_VER     ?= $(shell grep "^LINUX_VER" buildconfigs/mk.linux-2.6-xen | sed -e 's
 # Setup Linux search path
 LINUX_SRC_PATH ?= .:..
 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
+vpath patch-%.bz2 $(LINUX_SRC_PATH)
 
 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
@@ -33,6 +34,12 @@ linux-%.tar.bz2:
        @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
        wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
 
+patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
+patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
+patch-%.bz2:
+       @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
+       wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
+
 # Expand NetBSD release to NetBSD version
 NETBSD_RELEASE  ?= 2.0
 NETBSD_VER      ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
index fa052b8ea9f91bed5f62a5f0be56b38d5dc24ea3..948cd31ed2ff979ddab32e2d7869c4ab0649e6a8 100644 (file)
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen0
-# Wed Feb  1 15:54:13 2006
+# Linux kernel version: 2.6.16-rc1-git4-xen0
+# Thu Feb  2 18:19:17 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -32,17 +32,19 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -51,8 +53,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -115,6 +119,7 @@ CONFIG_M686=y
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -153,10 +158,9 @@ CONFIG_SWIOTLB=y
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -172,6 +176,7 @@ CONFIG_SECCOMP=y
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 
 #
@@ -285,6 +290,7 @@ CONFIG_BRIDGE_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -301,51 +307,6 @@ CONFIG_IP_NF_FTP=m
 # CONFIG_IP_NF_AMANDA is not set
 # CONFIG_IP_NF_PPTP is not set
 # CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-# CONFIG_IP_NF_MATCH_LIMIT is not set
-CONFIG_IP_NF_MATCH_IPRANGE=m
-# CONFIG_IP_NF_MATCH_MAC is not set
-# CONFIG_IP_NF_MATCH_PKTTYPE is not set
-# CONFIG_IP_NF_MATCH_MARK is not set
-# CONFIG_IP_NF_MATCH_MULTIPORT is not set
-# CONFIG_IP_NF_MATCH_TOS is not set
-# CONFIG_IP_NF_MATCH_RECENT is not set
-# CONFIG_IP_NF_MATCH_ECN is not set
-# CONFIG_IP_NF_MATCH_DSCP is not set
-# CONFIG_IP_NF_MATCH_AH_ESP is not set
-# CONFIG_IP_NF_MATCH_LENGTH is not set
-# CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_TCPMSS is not set
-# CONFIG_IP_NF_MATCH_HELPER is not set
-# CONFIG_IP_NF_MATCH_STATE is not set
-# CONFIG_IP_NF_MATCH_CONNTRACK is not set
-# CONFIG_IP_NF_MATCH_OWNER is not set
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_REALM is not set
-# CONFIG_IP_NF_MATCH_SCTP is not set
-# CONFIG_IP_NF_MATCH_DCCP is not set
-# CONFIG_IP_NF_MATCH_COMMENT is not set
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-# CONFIG_IP_NF_TARGET_TCPMSS is not set
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-# CONFIG_IP_NF_TARGET_REDIRECT is not set
-# CONFIG_IP_NF_TARGET_NETMAP is not set
-# CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_RAW is not set
-# CONFIG_IP_NF_ARPTABLES is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -361,6 +322,11 @@ CONFIG_IP_NF_NAT_FTP=m
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 CONFIG_BRIDGE=y
 # CONFIG_VLAN_8021Q is not set
@@ -564,6 +530,7 @@ CONFIG_AIC79XX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_ADVANSYS is not set
 CONFIG_MEGARAID_NEWGEN=y
 # CONFIG_MEGARAID_MM is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
@@ -592,13 +559,7 @@ CONFIG_SCSI_SATA_INTEL_COMBINED=y
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA24XX is not set
+# CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -721,12 +682,14 @@ CONFIG_ACENIC=y
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 CONFIG_SK98LIN=y
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
@@ -884,6 +847,7 @@ CONFIG_DRM_SIS=m
 # CONFIG_DRM_VIA is not set
 # CONFIG_DRM_SAVAGE is not set
 # CONFIG_MWAVE is not set
+# CONFIG_CS5535_GPIO is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_HPET is not set
 # CONFIG_HANGCHECK_TIMER is not set
@@ -899,6 +863,12 @@ CONFIG_DRM_SIS=m
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
@@ -988,12 +958,14 @@ CONFIG_USB_UHCI_HCD=y
 # may also be needed; see USB_STORAGE Help for more information
 #
 # CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
@@ -1007,6 +979,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
 
@@ -1083,6 +1056,11 @@ CONFIG_USB_MON=y
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
+
 #
 # File systems
 #
@@ -1103,6 +1081,7 @@ CONFIG_REISERFS_FS=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -1141,6 +1120,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -1246,12 +1226,13 @@ CONFIG_NLS_ISO8859_1=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -1261,11 +1242,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
@@ -1293,6 +1276,7 @@ CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_586 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
@@ -1344,3 +1328,4 @@ CONFIG_ZLIB_INFLATE=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_X86_BIOS_REBOOT=y
+CONFIG_KTIME_SCALAR=y
index 460393db98321cb1a05aedafc60c31ebfd14d085..7b8651bee5d07ec3260c64cad56114307275695a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen0
-# Wed Feb  1 15:50:08 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:51:17 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -36,17 +37,19 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -55,8 +58,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -90,6 +95,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set
 CONFIG_GENERIC_CPU=y
@@ -107,6 +114,7 @@ CONFIG_X86_LOCAL_APIC=y
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -116,9 +124,8 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_SWIOTLB=y
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -173,7 +180,6 @@ CONFIG_IA32_EMULATION=y
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -220,6 +226,7 @@ CONFIG_BRIDGE_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -236,51 +243,6 @@ CONFIG_IP_NF_FTP=m
 # CONFIG_IP_NF_AMANDA is not set
 # CONFIG_IP_NF_PPTP is not set
 # CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-# CONFIG_IP_NF_MATCH_LIMIT is not set
-CONFIG_IP_NF_MATCH_IPRANGE=m
-# CONFIG_IP_NF_MATCH_MAC is not set
-# CONFIG_IP_NF_MATCH_PKTTYPE is not set
-# CONFIG_IP_NF_MATCH_MARK is not set
-# CONFIG_IP_NF_MATCH_MULTIPORT is not set
-# CONFIG_IP_NF_MATCH_TOS is not set
-# CONFIG_IP_NF_MATCH_RECENT is not set
-# CONFIG_IP_NF_MATCH_ECN is not set
-# CONFIG_IP_NF_MATCH_DSCP is not set
-# CONFIG_IP_NF_MATCH_AH_ESP is not set
-# CONFIG_IP_NF_MATCH_LENGTH is not set
-# CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_TCPMSS is not set
-# CONFIG_IP_NF_MATCH_HELPER is not set
-# CONFIG_IP_NF_MATCH_STATE is not set
-# CONFIG_IP_NF_MATCH_CONNTRACK is not set
-# CONFIG_IP_NF_MATCH_OWNER is not set
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_REALM is not set
-# CONFIG_IP_NF_MATCH_SCTP is not set
-# CONFIG_IP_NF_MATCH_DCCP is not set
-# CONFIG_IP_NF_MATCH_COMMENT is not set
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-# CONFIG_IP_NF_TARGET_TCPMSS is not set
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-# CONFIG_IP_NF_TARGET_REDIRECT is not set
-# CONFIG_IP_NF_TARGET_NETMAP is not set
-# CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_RAW is not set
-# CONFIG_IP_NF_ARPTABLES is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -296,6 +258,11 @@ CONFIG_IP_NF_NAT_FTP=m
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 CONFIG_BRIDGE=y
 # CONFIG_VLAN_8021Q is not set
@@ -499,6 +466,7 @@ CONFIG_AIC79XX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_ADVANSYS is not set
 CONFIG_MEGARAID_NEWGEN=y
 # CONFIG_MEGARAID_MM is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
@@ -531,13 +499,7 @@ CONFIG_SCSI_BUSLOGIC=y
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA24XX is not set
+# CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -659,12 +621,14 @@ CONFIG_ACENIC=y
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 CONFIG_SK98LIN=y
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
@@ -824,6 +788,12 @@ CONFIG_DRM_SIS=m
 #
 # CONFIG_I2C is not set
 
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
 #
 # Dallas's 1-wire bus
 #
@@ -913,12 +883,14 @@ CONFIG_USB_UHCI_HCD=y
 # may also be needed; see USB_STORAGE Help for more information
 #
 # CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
@@ -932,6 +904,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
 
@@ -1016,6 +989,11 @@ CONFIG_INFINIBAND_SRP=y
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
+
 #
 # Firmware Drivers
 #
@@ -1042,6 +1020,7 @@ CONFIG_REISERFS_FS=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -1080,6 +1059,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -1186,20 +1166,23 @@ CONFIG_NLS_ISO8859_1=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -1224,6 +1207,7 @@ CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_X86_64 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
index 23cad4e3056907dfd9164a06b49c70b26666076a..d3307b773d8ce46d6b24a0d39640a528fc553159 100644 (file)
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xenU
-# Wed Feb  1 17:28:35 2006
+# Linux kernel version: 2.6.16-rc1-git4-xenU
+# Thu Feb  2 18:28:58 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -31,18 +31,20 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -51,8 +53,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -116,6 +120,7 @@ CONFIG_M686=y
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -152,10 +157,9 @@ CONFIG_X86_CPUID=y
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -170,6 +174,7 @@ CONFIG_SECCOMP=y
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_HOTPLUG_CPU=y
 
@@ -223,6 +228,11 @@ CONFIG_TCP_CONG_BIC=y
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -371,6 +381,11 @@ CONFIG_NETDEVICES=y
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
+
 #
 # File systems
 #
@@ -391,6 +406,7 @@ CONFIG_REISERFS_FS=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -429,6 +445,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -529,12 +546,13 @@ CONFIG_NLS_ISO8859_1=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -544,11 +562,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 
 #
@@ -574,6 +594,7 @@ CONFIG_CRYPTO_MD5=m
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_586 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
@@ -622,3 +643,4 @@ CONFIG_GENERIC_PENDING_IRQ=y
 CONFIG_X86_SMP=y
 CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
index c3a8be6b164e7b46a0da1ae95402ba8938514e2f..b80f5ecc803ccfdbfcce79eb7297386b108eabd7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xenU
-# Wed Feb  1 15:49:27 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:50:11 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -37,18 +38,20 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_SYSCTL=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -57,8 +60,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -93,6 +98,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 CONFIG_MPSC=y
 # CONFIG_GENERIC_CPU is not set
@@ -109,6 +116,7 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -118,10 +126,9 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=8
 # CONFIG_HOTPLUG_CPU is not set
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -148,7 +155,6 @@ CONFIG_IA32_EMULATION=y
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -243,6 +249,7 @@ CONFIG_BRIDGE_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -259,91 +266,11 @@ CONFIG_IP_NF_TFTP=m
 CONFIG_IP_NF_AMANDA=m
 # CONFIG_IP_NF_PPTP is not set
 CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-# CONFIG_IP_NF_MATCH_DCCP is not set
-CONFIG_IP_NF_MATCH_COMMENT=m
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-# CONFIG_IP_NF_TARGET_TTL is not set
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
 
 #
 # IPv6: Netfilter Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-# CONFIG_IP6_NF_TARGET_REJECT is not set
-# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-# CONFIG_IP6_NF_TARGET_HL is not set
-CONFIG_IP6_NF_RAW=m
 
 #
 # Bridge: Netfilter Configuration
@@ -383,6 +310,11 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 CONFIG_ATM=m
 CONFIG_ATM_CLIP=m
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -697,6 +629,11 @@ CONFIG_INPUT=m
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
+
 #
 # Firmware Drivers
 #
@@ -736,6 +673,7 @@ CONFIG_XFS_EXPORT=y
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+# CONFIG_OCFS2_FS is not set
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -778,6 +716,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -857,6 +796,7 @@ CONFIG_UNIXWARE_DISKLABEL=y
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 CONFIG_SUN_PARTITION=y
+# CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 
 #
@@ -913,20 +853,23 @@ CONFIG_NLS_UTF8=m
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -951,6 +894,7 @@ CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_SERPENT=m
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_X86_64 is not set
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
index 162eeaa4ab64364046cb25d179e86275dfb06547..ada246db0355c2ad2d910f8ec623d0d25223e4a1 100644 (file)
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen
-# Wed Feb  1 17:28:24 2006
+# Linux kernel version: 2.6.16-rc1-git4-xen
+# Thu Feb  2 18:43:06 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -34,18 +34,20 @@ CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EMBEDDED=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -54,8 +56,11 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+CONFIG_OBSOLETE_INTERMODULE=m
 
 #
 # Loadable module support
@@ -119,6 +124,7 @@ CONFIG_M686=y
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -158,10 +164,9 @@ CONFIG_SWIOTLB=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -177,8 +182,8 @@ CONFIG_SECCOMP=y
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
-CONFIG_PHYSICAL_START=0x100000
 # CONFIG_CRASH_DUMP is not set
+CONFIG_PHYSICAL_START=0x100000
 CONFIG_HOTPLUG_CPU=y
 
 #
@@ -244,6 +249,11 @@ CONFIG_CARDBUS=y
 # PC-card bridges
 #
 CONFIG_YENTA=m
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
 CONFIG_PD6729=m
 CONFIG_I82092=m
 CONFIG_PCCARD_NONSTATIC=m
@@ -313,6 +323,7 @@ CONFIG_TCP_CONG_ADVANCED=y
 # TCP congestion control
 #
 CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=m
 CONFIG_TCP_CONG_WESTWOOD=m
 CONFIG_TCP_CONG_HTCP=m
 CONFIG_TCP_CONG_HSTCP=m
@@ -370,6 +381,29 @@ CONFIG_BRIDGE_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
 #
 # IP: Netfilter Configuration
@@ -388,40 +422,23 @@ CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
 CONFIG_IP_NF_MATCH_RECENT=m
 CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_DSCP=m
 CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_DCCP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNBYTES=m
 CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_STRING=m
+CONFIG_IP_NF_MATCH_POLICY=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_TARGET_NFQUEUE=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -438,13 +455,9 @@ CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CONNMARK=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
@@ -454,26 +467,20 @@ CONFIG_IP_NF_ARP_MANGLE=m
 #
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
 CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_FRAG=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_MULTIPORT=m
 CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
 CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
+CONFIG_IP6_NF_MATCH_POLICY=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_LOG=m
 CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_TARGET_NFQUEUE=m
 CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_RAW=m
 
@@ -533,6 +540,19 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+CONFIG_TIPC=m
+CONFIG_TIPC_ADVANCED=y
+CONFIG_TIPC_ZONES=3
+CONFIG_TIPC_CLUSTERS=1
+CONFIG_TIPC_NODES=255
+CONFIG_TIPC_SLAVE_NODES=0
+CONFIG_TIPC_PORTS=8191
+CONFIG_TIPC_LOG=0
+# CONFIG_TIPC_DEBUG is not set
 CONFIG_ATM=y
 CONFIG_ATM_CLIP=y
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -828,6 +848,8 @@ CONFIG_MTD_PLATRAM=m
 CONFIG_MTD_PMC551=m
 # CONFIG_MTD_PMC551_BUGFIX is not set
 # CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_DATAFLASH=m
+CONFIG_MTD_M25P80=m
 CONFIG_MTD_SLRAM=m
 CONFIG_MTD_PHRAM=m
 CONFIG_MTD_MTDRAM=m
@@ -1075,6 +1097,7 @@ CONFIG_SCSI_ADVANSYS=m
 CONFIG_MEGARAID_NEWGEN=y
 CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
 CONFIG_SCSI_SATA=m
 CONFIG_SCSI_SATA_AHCI=m
@@ -1114,13 +1137,8 @@ CONFIG_SCSI_IPR=m
 CONFIG_SCSI_QLOGIC_FC=m
 CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
 CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
+CONFIG_SCSI_QLA_FC=m
+# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
@@ -1197,15 +1215,13 @@ CONFIG_IEEE1394_SBP2=m
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
 
 #
 # I2O device support
 #
 CONFIG_I2O=m
+CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
 CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
 CONFIG_I2O_CONFIG=m
 CONFIG_I2O_CONFIG_OLD_IOCTL=y
 CONFIG_I2O_BUS=m
@@ -1315,6 +1331,7 @@ CONFIG_VIA_RHINE=m
 CONFIG_DL2K=m
 CONFIG_E1000=m
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
@@ -1323,6 +1340,7 @@ CONFIG_R8169=m
 # CONFIG_R8169_VLAN is not set
 CONFIG_SIS190=m
 CONFIG_SKGE=m
+CONFIG_SKY2=m
 CONFIG_SK98LIN=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
@@ -1370,8 +1388,9 @@ CONFIG_PCMCIA_RAYCS=m
 #
 CONFIG_IPW2100=m
 CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW_DEBUG is not set
+# CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2200=m
+# CONFIG_IPW2200_DEBUG is not set
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
 CONFIG_TMD_HERMES=m
@@ -1703,6 +1722,7 @@ CONFIG_JOYSTICK_GAMECON=m
 CONFIG_JOYSTICK_TURBOGRAFX=m
 CONFIG_JOYSTICK_JOYDUMP=m
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
 CONFIG_TOUCHSCREEN_GUNZE=m
 CONFIG_TOUCHSCREEN_ELO=m
 CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -1744,13 +1764,13 @@ CONFIG_SERIAL_8250=m
 # CONFIG_SERIAL_8250_CS is not set
 # CONFIG_SERIAL_8250_ACPI is not set
 CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_CORE=m
-CONFIG_SERIAL_JSM=m
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -1799,6 +1819,7 @@ CONFIG_W83627HF_WDT=m
 CONFIG_W83877F_WDT=m
 CONFIG_W83977F_WDT=m
 CONFIG_MACHZ_WDT=m
+CONFIG_SBC_EPX_C3_WATCHDOG=m
 
 #
 # PCI-based Watchdog Cards
@@ -1856,6 +1877,7 @@ CONFIG_CARDMAN_4000=m
 CONFIG_CARDMAN_4040=m
 CONFIG_MWAVE=m
 CONFIG_SCx200_GPIO=m
+CONFIG_CS5535_GPIO=m
 CONFIG_RAW_DRIVER=m
 CONFIG_MAX_RAW_DEVS=256
 # CONFIG_HPET is not set
@@ -1928,6 +1950,23 @@ CONFIG_RTC_X1205_I2C=m
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+CONFIG_SPI_BUTTERFLY=m
+
+#
+# SPI Protocol Masters
+#
+
 #
 # Dallas's 1-wire bus
 #
@@ -1974,6 +2013,7 @@ CONFIG_SENSORS_SIS5595=m
 CONFIG_SENSORS_SMSC47M1=m
 # CONFIG_SENSORS_SMSC47B397 is not set
 CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_VT8231=m
 CONFIG_SENSORS_W83781D=m
 CONFIG_SENSORS_W83792D=m
 CONFIG_SENSORS_W83L785TS=m
@@ -2003,6 +2043,7 @@ CONFIG_VIDEO_DEV=m
 #
 # Video Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
 CONFIG_VIDEO_BT848=m
 # CONFIG_VIDEO_BT848_DVB is not set
 CONFIG_VIDEO_SAA6588=m
@@ -2031,6 +2072,7 @@ CONFIG_VIDEO_HEXIUM_ORION=m
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_CX88=m
 # CONFIG_VIDEO_CX88_DVB is not set
+CONFIG_VIDEO_CX88_ALSA=m
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_OVCAMCHIP=m
 CONFIG_VIDEO_AUDIO_DECODER=m
@@ -2066,6 +2108,7 @@ CONFIG_DVB_USB=m
 # CONFIG_DVB_USB_DEBUG is not set
 CONFIG_DVB_USB_A800=m
 CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
 CONFIG_DVB_USB_DIBUSB_MC=m
 CONFIG_DVB_USB_UMT_010=m
 CONFIG_DVB_USB_CXUSB=m
@@ -2110,6 +2153,7 @@ CONFIG_DVB_PLUTO2=m
 #
 CONFIG_DVB_STV0299=m
 CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
 CONFIG_DVB_TDA8083=m
 CONFIG_DVB_TDA80XX=m
 CONFIG_DVB_MT312=m
@@ -2202,7 +2246,6 @@ CONFIG_FB_ATY128=m
 CONFIG_FB_ATY=m
 CONFIG_FB_ATY_CT=y
 CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_XL_INIT=y
 CONFIG_FB_ATY_GX=y
 CONFIG_FB_SAVAGE=m
 CONFIG_FB_SAVAGE_I2C=y
@@ -2249,8 +2292,6 @@ CONFIG_SOUND=m
 # Advanced Linux Sound Architecture
 #
 CONFIG_SND=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
 CONFIG_SND_HWDEP=m
@@ -2263,9 +2304,10 @@ CONFIG_SND_PCM_OSS=m
 CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_RTCTIMER=m
 CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-CONFIG_SND_GENERIC_DRIVER=y
 
 #
 # Generic devices
@@ -2273,6 +2315,8 @@ CONFIG_SND_GENERIC_DRIVER=y
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_OPL3_LIB=m
 CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_AC97_BUS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
@@ -2282,6 +2326,7 @@ CONFIG_SND_MPU401=m
 #
 # PCI devices
 #
+CONFIG_SND_AD1889=m
 CONFIG_SND_ALI5451=m
 CONFIG_SND_ATIIXP=m
 CONFIG_SND_ATIIXP_MODEM=m
@@ -2291,40 +2336,41 @@ CONFIG_SND_AU8830=m
 CONFIG_SND_AZT3328=m
 CONFIG_SND_BT87X=m
 # CONFIG_SND_BT87X_OVERCLOCK is not set
+CONFIG_SND_CA0106=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_CS4281=m
 CONFIG_SND_CS46XX=m
 CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
+CONFIG_SND_CS5535AUDIO=m
 CONFIG_SND_EMU10K1=m
 # CONFIG_SND_EMU10K1X is not set
-# CONFIG_SND_CA0106 is not set
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_AD1889=m
-CONFIG_SND_CMIPCI=m
 CONFIG_SND_ENS1370=m
 CONFIG_SND_ENS1371=m
 CONFIG_SND_ES1938=m
 CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
 CONFIG_SND_FM801=m
 CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_HDSPM=m
 CONFIG_SND_ICE1712=m
 CONFIG_SND_ICE1724=m
 CONFIG_SND_INTEL8X0=m
 CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_PCXHR=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
 CONFIG_SND_SONICVIBES=m
+CONFIG_SND_TRIDENT=m
 CONFIG_SND_VIA82XX=m
 # CONFIG_SND_VIA82XX_MODEM is not set
 CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_YMFPCI=m
 
 #
 # USB devices
@@ -2403,12 +2449,15 @@ CONFIG_USB_STORAGE_USBAT=y
 CONFIG_USB_STORAGE_SDDR09=y
 CONFIG_USB_STORAGE_SDDR55=y
 CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_LIBUSUAL=y
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=m
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 CONFIG_USB_HIDDEV=y
 
@@ -2428,6 +2477,7 @@ CONFIG_USB_EGALAX=m
 CONFIG_USB_YEALINK=m
 CONFIG_USB_XPAD=m
 CONFIG_USB_ATI_REMOTE=m
+CONFIG_USB_ATI_REMOTE2=m
 CONFIG_USB_KEYSPAN_REMOTE=m
 CONFIG_USB_APPLETOUCH=m
 
@@ -2555,6 +2605,7 @@ CONFIG_USB_TEST=m
 CONFIG_USB_ATM=m
 CONFIG_USB_SPEEDTOUCH=m
 CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
 CONFIG_USB_XUSBATM=m
 
 #
@@ -2593,6 +2644,24 @@ CONFIG_USB_G_SERIAL=m
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+CONFIG_EDAC=m
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
+
 #
 # File systems
 #
@@ -2625,6 +2694,7 @@ CONFIG_XFS_EXPORT=y
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 CONFIG_XFS_RT=y
+CONFIG_OCFS2_FS=m
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -2669,6 +2739,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 CONFIG_RELAYFS_FS=m
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -2769,6 +2840,7 @@ CONFIG_LDM_PARTITION=y
 CONFIG_SGI_PARTITION=y
 CONFIG_ULTRIX_PARTITION=y
 CONFIG_SUN_PARTITION=y
+CONFIG_KARMA_PARTITION=y
 CONFIG_EFI_PARTITION=y
 
 #
@@ -2824,12 +2896,13 @@ CONFIG_NLS_UTF8=m
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -2839,11 +2912,13 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_FRAME_POINTER is not set
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_EARLY_PRINTK is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
@@ -2945,3 +3020,4 @@ CONFIG_GENERIC_PENDING_IRQ=y
 CONFIG_X86_SMP=y
 CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
index efb137f4f90846fe299c7fb1b5faf87b5c13ae7c..20f898564464470769e302373ab4a2ee67f93e7e 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen
-# Wed Feb  1 15:51:35 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:54:57 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -37,18 +38,20 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -57,8 +60,11 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+CONFIG_OBSOLETE_INTERMODULE=m
 
 #
 # Loadable module support
@@ -93,6 +99,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set
 CONFIG_GENERIC_CPU=y
@@ -111,6 +119,7 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -120,11 +129,10 @@ CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=8
 # CONFIG_HOTPLUG_CPU is not set
 CONFIG_SWIOTLB=y
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -180,7 +188,6 @@ CONFIG_IA32_EMULATION=y
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -228,6 +235,7 @@ CONFIG_TCP_CONG_ADVANCED=y
 # TCP congestion control
 #
 CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=m
 CONFIG_TCP_CONG_WESTWOOD=m
 CONFIG_TCP_CONG_HTCP=m
 CONFIG_TCP_CONG_HSTCP=m
@@ -285,6 +293,29 @@ CONFIG_BRIDGE_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
 #
 # IP: Netfilter Configuration
@@ -303,40 +334,23 @@ CONFIG_IP_NF_AMANDA=m
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
 CONFIG_IP_NF_MATCH_RECENT=m
 CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_DSCP=m
 CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_DCCP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNBYTES=m
 CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_STRING=m
+CONFIG_IP_NF_MATCH_POLICY=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_TARGET_NFQUEUE=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -353,13 +367,9 @@ CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CONNMARK=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
@@ -369,26 +379,20 @@ CONFIG_IP_NF_ARP_MANGLE=m
 #
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
 CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_FRAG=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_MULTIPORT=m
 CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
 CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
+CONFIG_IP6_NF_MATCH_POLICY=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_LOG=m
 CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_TARGET_NFQUEUE=m
 CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_RAW=m
 
@@ -443,6 +447,13 @@ CONFIG_IP_SCTP=m
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
 CONFIG_ATM=m
 CONFIG_ATM_CLIP=m
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -708,6 +719,8 @@ CONFIG_MTD_PLATRAM=m
 CONFIG_MTD_PMC551=m
 # CONFIG_MTD_PMC551_BUGFIX is not set
 # CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_DATAFLASH=m
+CONFIG_MTD_M25P80=m
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 CONFIG_MTD_MTDRAM=m
@@ -939,6 +952,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
 CONFIG_MEGARAID_NEWGEN=y
 CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
 CONFIG_SCSI_SATA=y
 CONFIG_SCSI_SATA_AHCI=m
@@ -979,13 +993,8 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=y
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
+CONFIG_SCSI_QLA_FC=m
+# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
@@ -1052,13 +1061,12 @@ CONFIG_IEEE1394_SBP2=m
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
 
 #
 # I2O device support
 #
 CONFIG_I2O=m
+CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
 CONFIG_I2O_EXT_ADAPTEC=y
 CONFIG_I2O_EXT_ADAPTEC_DMA64=y
 CONFIG_I2O_CONFIG=m
@@ -1161,6 +1169,7 @@ CONFIG_ACENIC=m
 CONFIG_DL2K=m
 CONFIG_E1000=m
 CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
@@ -1169,6 +1178,7 @@ CONFIG_R8169_NAPI=y
 CONFIG_R8169_VLAN=y
 CONFIG_SIS190=m
 CONFIG_SKGE=m
+CONFIG_SKY2=m
 CONFIG_SK98LIN=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
@@ -1208,8 +1218,9 @@ CONFIG_NET_RADIO=y
 #
 CONFIG_IPW2100=m
 CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW_DEBUG is not set
+# CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2200=m
+# CONFIG_IPW2200_DEBUG is not set
 CONFIG_AIRO=m
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
@@ -1461,6 +1472,7 @@ CONFIG_JOYSTICK_GAMECON=m
 CONFIG_JOYSTICK_TURBOGRAFX=m
 CONFIG_JOYSTICK_JOYDUMP=m
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
 CONFIG_TOUCHSCREEN_GUNZE=m
 CONFIG_TOUCHSCREEN_ELO=m
 CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -1548,6 +1560,7 @@ CONFIG_W83627HF_WDT=m
 CONFIG_W83877F_WDT=m
 CONFIG_W83977F_WDT=m
 CONFIG_MACHZ_WDT=m
+CONFIG_SBC_EPX_C3_WATCHDOG=m
 
 #
 # PCI-based Watchdog Cards
@@ -1648,6 +1661,23 @@ CONFIG_RTC_X1205_I2C=m
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+CONFIG_SPI_BUTTERFLY=m
+
+#
+# SPI Protocol Masters
+#
+
 #
 # Dallas's 1-wire bus
 #
@@ -1694,6 +1724,7 @@ CONFIG_SENSORS_SIS5595=m
 CONFIG_SENSORS_SMSC47M1=m
 CONFIG_SENSORS_SMSC47B397=m
 CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_VT8231=m
 CONFIG_SENSORS_W83781D=m
 CONFIG_SENSORS_W83792D=m
 CONFIG_SENSORS_W83L785TS=m
@@ -1723,6 +1754,7 @@ CONFIG_VIDEO_DEV=m
 #
 # Video Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
 CONFIG_VIDEO_BT848=m
 # CONFIG_VIDEO_BT848_DVB is not set
 CONFIG_VIDEO_SAA6588=m
@@ -1753,6 +1785,7 @@ CONFIG_VIDEO_HEXIUM_ORION=m
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_CX88=m
 CONFIG_VIDEO_CX88_DVB=m
+CONFIG_VIDEO_CX88_ALSA=m
 CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_OVCAMCHIP=m
@@ -1789,6 +1822,7 @@ CONFIG_DVB_USB=m
 # CONFIG_DVB_USB_DEBUG is not set
 CONFIG_DVB_USB_A800=m
 CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
 CONFIG_DVB_USB_DIBUSB_MC=m
 CONFIG_DVB_USB_UMT_010=m
 CONFIG_DVB_USB_CXUSB=m
@@ -1838,6 +1872,7 @@ CONFIG_DVB_PLUTO2=m
 #
 CONFIG_DVB_STV0299=m
 CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
 CONFIG_DVB_TDA8083=m
 CONFIG_DVB_TDA80XX=m
 CONFIG_DVB_MT312=m
@@ -1925,7 +1960,6 @@ CONFIG_FB_ATY128=m
 CONFIG_FB_ATY=m
 CONFIG_FB_ATY_CT=y
 CONFIG_FB_ATY_GENERIC_LCD=y
-# CONFIG_FB_ATY_XL_INIT is not set
 CONFIG_FB_ATY_GX=y
 CONFIG_FB_SAVAGE=m
 CONFIG_FB_SAVAGE_I2C=y
@@ -1936,7 +1970,6 @@ CONFIG_FB_KYRO=m
 CONFIG_FB_3DFX=m
 CONFIG_FB_3DFX_ACCEL=y
 CONFIG_FB_VOODOO1=m
-CONFIG_FB_CYBLA=m
 CONFIG_FB_TRIDENT=m
 CONFIG_FB_TRIDENT_ACCEL=y
 # CONFIG_FB_PM3 is not set
@@ -1976,8 +2009,6 @@ CONFIG_SOUND=m
 # Advanced Linux Sound Architecture
 #
 CONFIG_SND=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
 CONFIG_SND_HWDEP=m
@@ -1990,9 +2021,10 @@ CONFIG_SND_PCM_OSS=m
 CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_RTCTIMER=m
 CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-CONFIG_SND_GENERIC_DRIVER=y
 
 #
 # Generic devices
@@ -2000,6 +2032,8 @@ CONFIG_SND_GENERIC_DRIVER=y
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_OPL3_LIB=m
 CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_AC97_BUS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
@@ -2009,6 +2043,8 @@ CONFIG_SND_MPU401=m
 #
 # PCI devices
 #
+CONFIG_SND_AD1889=m
+CONFIG_SND_ALS4000=m
 CONFIG_SND_ALI5451=m
 CONFIG_SND_ATIIXP=m
 CONFIG_SND_ATIIXP_MODEM=m
@@ -2018,41 +2054,40 @@ CONFIG_SND_AU8830=m
 CONFIG_SND_AZT3328=m
 CONFIG_SND_BT87X=m
 # CONFIG_SND_BT87X_OVERCLOCK is not set
+CONFIG_SND_CA0106=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_CS4281=m
 CONFIG_SND_CS46XX=m
 CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
 CONFIG_SND_EMU10K1=m
 CONFIG_SND_EMU10K1X=m
-CONFIG_SND_CA0106=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
 CONFIG_SND_ENS1370=m
 CONFIG_SND_ENS1371=m
 CONFIG_SND_ES1938=m
 CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
 CONFIG_SND_FM801=m
 CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_HDSPM=m
 CONFIG_SND_ICE1712=m
 CONFIG_SND_ICE1724=m
 CONFIG_SND_INTEL8X0=m
 CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_PCXHR=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
 CONFIG_SND_SONICVIBES=m
+CONFIG_SND_TRIDENT=m
 CONFIG_SND_VIA82XX=m
 CONFIG_SND_VIA82XX_MODEM=m
 CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_YMFPCI=m
 
 #
 # USB devices
@@ -2119,12 +2154,15 @@ CONFIG_USB_STORAGE_USBAT=y
 CONFIG_USB_STORAGE_SDDR09=y
 CONFIG_USB_STORAGE_SDDR55=y
 CONFIG_USB_STORAGE_JUMPSHOT=y
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 CONFIG_HID_FF=y
 CONFIG_HID_PID=y
 CONFIG_LOGITECH_FF=y
@@ -2141,6 +2179,7 @@ CONFIG_USB_EGALAX=m
 CONFIG_USB_YEALINK=m
 CONFIG_USB_XPAD=m
 CONFIG_USB_ATI_REMOTE=m
+CONFIG_USB_ATI_REMOTE2=m
 CONFIG_USB_KEYSPAN_REMOTE=m
 CONFIG_USB_APPLETOUCH=m
 
@@ -2267,6 +2306,7 @@ CONFIG_USB_TEST=m
 CONFIG_USB_ATM=m
 CONFIG_USB_SPEEDTOUCH=m
 CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
 CONFIG_USB_XUSBATM=m
 
 #
@@ -2298,6 +2338,24 @@ CONFIG_INFINIBAND_SRP=m
 # SN Devices
 #
 
+#
+# EDAC - error detection and reporting (RAS)
+#
+CONFIG_EDAC=m
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
+
 #
 # Firmware Drivers
 #
@@ -2338,6 +2396,7 @@ CONFIG_XFS_EXPORT=y
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+CONFIG_OCFS2_FS=m
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -2380,6 +2439,7 @@ CONFIG_TMPFS=y
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 CONFIG_RELAYFS_FS=m
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -2469,6 +2529,7 @@ CONFIG_UNIXWARE_DISKLABEL=y
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 CONFIG_SUN_PARTITION=y
+# CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 
 #
@@ -2525,20 +2586,23 @@ CONFIG_NLS_UTF8=m
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_FRAME_POINTER is not set
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -2547,6 +2611,7 @@ CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
index 250a0a4c5f0b441a1db8d414ff6ca36c47bc9020..8cd833bc383fe86c80ff6a22caa5e041b5d1acc1 100644 (file)
@@ -2,7 +2,7 @@
 OS           = linux
 
 LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.15
+LINUX_VER    = 2.6.16-rc1-git4
 
 EXTRAVERSION ?= xen
 
@@ -20,6 +20,18 @@ build: $(LINUX_DIR)/include/linux/autoconf.h
        fi
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
 
+pristine-linux-%/.valid-pristine: override _LINUX_PDIR = linux-$*.16-rc1-git4
+pristine-linux-%.16-rc1-git4/.valid-pristine: linux-%.15.tar.bz2 patch-%.16-rc1.bz2 patch-%.16-rc1-git4.bz2
+       rm -rf tmp-pristine-$(_LINUX_PDIR) $(@D)
+       mkdir -p tmp-pristine-$(_LINUX_PDIR)
+       tar -C tmp-pristine-$(_LINUX_PDIR) -jxf $<
+       -@rm tmp-pristine-$(_LINUX_PDIR)/pax_global_header
+       mv tmp-pristine-$(_LINUX_PDIR)/* $(@D)
+       @rm -rf tmp-pristine-$(_LINUX_PDIR)
+       bzcat $(wordlist 2,$(words $^),$^) | patch -d $(@D) -p1
+       touch $(@D)/.hgskip
+       touch $@ # update timestamp to avoid rebuild
+
 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
        rm -rf $(LINUX_DIR)
        cp -al $(<D) $(LINUX_DIR)
index 5ad468597665aadc5afe34a9e5c0fbc4f238ff5d..516072ae57094f430d1a4c0c18f1f0b4ee0fbd27 100644 (file)
@@ -29,10 +29,6 @@ config MMU
 config SBUS
        bool
 
-config UID16
-       bool
-       default y
-
 config GENERIC_ISA_DMA
        bool
        default y
@@ -45,8 +41,22 @@ config ARCH_MAY_HAVE_PC_FDC
        bool
        default y
 
+config DMI
+       bool
+       default y
+
 source "init/Kconfig"
 
+config DOUBLEFAULT
+       default y
+       bool "Enable doublefault exception handler" if EMBEDDED
+       depends on !XEN
+       help
+          This option allows trapping of rare doublefault exceptions that
+          would otherwise cause a system to silently reboot. Disabling this
+          option saves about 4k and might cause you much additional grey
+          hair.
+
 menu "Processor type and features"
 
 choice
@@ -498,7 +508,6 @@ config NUMA
        depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
        default n if X86_PC
        default y if (X86_NUMAQ || X86_SUMMIT)
-       select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -527,6 +536,10 @@ config HAVE_ARCH_ALLOC_REMAP
        depends on NUMA
        default y
 
+config ARCH_FLATMEM_ENABLE
+       def_bool y
+       depends on (ARCH_SELECT_MEMORY_MODEL && X86_PC)
+
 config ARCH_DISCONTIGMEM_ENABLE
        def_bool y
        depends on NUMA
@@ -537,7 +550,8 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config ARCH_SPARSEMEM_ENABLE
        def_bool y
-       depends on NUMA
+       depends on (NUMA || (X86_PC && EXPERIMENTAL))
+       select SPARSEMEM_STATIC
 
 config ARCH_SELECT_MEMORY_MODEL
        def_bool y
@@ -663,10 +677,6 @@ config REGPARM
        and passes the first three arguments of a function call in registers.
        This will probably break binary only modules.
 
-       This feature is only enabled for gcc-3.0 and later - earlier compilers
-       generate incorrect output with certain kernel constructs when
-       -mregparm=3 is used.
-
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
        depends on PROC_FS
@@ -686,17 +696,6 @@ config SECCOMP
 
 source kernel/Kconfig.hz
 
-config PHYSICAL_START
-       hex "Physical address where the kernel is loaded" if EMBEDDED
-       default "0x100000"
-       help
-         This gives the physical address where the kernel is loaded.
-         Primarily used in the case of kexec on panic where the
-         fail safe kernel needs to run at a different address than
-         the panic-ed kernel.
-
-         Don't change this unless you know what you are doing.
-
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
        depends on EXPERIMENTAL && !X86_XEN
@@ -716,12 +715,31 @@ config KEXEC
 
 config CRASH_DUMP
        bool "kernel crash dumps (EXPERIMENTAL)"
-       depends on EMBEDDED
        depends on EXPERIMENTAL
        depends on HIGHMEM
        help
          Generate crash dump after being started by kexec.
 
+config PHYSICAL_START
+       hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
+
+       default "0x1000000" if CRASH_DUMP
+       default "0x100000"
+       help
+         This gives the physical address where the kernel is loaded. Normally
+         for regular kernels this value is 0x100000 (1MB). But in the case
+         of kexec on panic the fail safe kernel needs to run at a different
+         address than the panic-ed kernel. This option is used to set the load
+         address for kernels used to capture crash dump on being kexec'ed
+         after panic. The default value for crash dump kernels is
+         0x1000000 (16MB). This can also be set based on the "X" value as
+         specified in the "crashkernel=YM@XM" command line boot parameter
+         passed to the panic-ed kernel. Typically this parameter is set as
+         crashkernel=64M@16M. Please take a look at
+         Documentation/kdump/kdump.txt for more details about crash dumps.
+
+         Don't change this unless you know what you are doing.
+
 config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
        depends on SMP && HOTPLUG && EXPERIMENTAL
@@ -1102,3 +1120,7 @@ config X86_TRAMPOLINE
        bool
        depends on X86_SMP || (X86_VOYAGER && SMP)
        default y
+
+config KTIME_SCALAR
+       bool
+       default y
index 1c31ba91a40e9efce87a918b3b45d1ec266b5104..230a132fdf5bf61780281afd0034a2a75ed0feba 100644 (file)
@@ -37,14 +37,11 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
 # CPU-specific tuning. Anything which can be shared with UML should go here.
 include $(srctree)/arch/i386/Makefile.cpu
 
-# -mregparm=3 works ok on gcc-3.0 and later
-#
-GCC_VERSION                    := $(call cc-version)
-cflags-$(CONFIG_REGPARM)       += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
+cflags-$(CONFIG_REGPARM) += -mregparm=3
 
-# Disable unit-at-a-time mode, it makes gcc use a lot more stack
-# due to the lack of sharing of stacklots.
-CFLAGS += $(call cc-option,-fno-unit-at-a-time)
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+CFLAGS                         += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 CFLAGS += $(cflags-y)
 
@@ -107,7 +104,7 @@ AFLAGS += $(mflags-y)
 boot := arch/i386/boot
 
 .PHONY: zImage bzImage compressed zlilo bzlilo \
-       zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install
+       zdisk bzdisk fdimage fdimage144 fdimage288 install
 
 ifdef CONFIG_XEN
 CPPFLAGS        := -D__KERNEL__ -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen $(LINUXINCLUDE)
@@ -142,8 +139,7 @@ zdisk bzdisk: vmlinux
 fdimage fdimage144 fdimage288: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
 
-install: vmlinux
-install kernel_install:
+install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
 endif
 
index fba91de3c2f10a7ffb58d8bb8178ede8ffb18500..369c00bdd8f8961d319f7f77d723cd86bd89ff93 100644 (file)
@@ -4,10 +4,10 @@
 
 extra-y := head.o init_task.o vmlinux.lds
 
-obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
+obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
                pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
-               doublefault.o quirks.o i8237.o
+               quirks.o i8237.o
 
 obj-y                          += cpu/
 obj-y                          += timers/
@@ -25,6 +25,7 @@ obj-$(CONFIG_X86_LOCAL_APIC)  += apic.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o
 obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups.o
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_X86_NUMAQ)                += numaq.o
 obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit.o
 obj-$(CONFIG_KPROBES)          += kprobes.o
@@ -33,6 +34,8 @@ obj-y                         += sysenter.o vsyscall.o
 obj-$(CONFIG_ACPI_SRAT)        += srat.o
 obj-$(CONFIG_HPET_TIMER)       += time_hpet.o
 obj-$(CONFIG_EFI)              += efi.o efi_stub.o
+obj-$(CONFIG_DOUBLEFAULT)      += doublefault.o
+obj-$(CONFIG_VM86)             += vm86.o
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 obj-$(CONFIG_SMP_ALTERNATIVES) += smpalts.o
 
@@ -86,7 +89,7 @@ include $(srctree)/scripts/Makefile.xen
 
 obj-y += fixup.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
-n-obj-xen := i8259.o doublefault.o timers/ reboot.o smpboot.o trampoline.o
+n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
 
 obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
 obj-y := $(call cherrypickxen, $(obj-y))
index cb942706d749fea2bf52e683cda4ed5a1473d940..68fcc76928cd6e0e292b84bff7099ea0e894613a 100644 (file)
@@ -108,7 +108,7 @@ char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
        if (!phys_addr || !size)
                return NULL;
 
-       if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+       if (phys_addr+size <= (end_pfn_map << PAGE_SHIFT) + PAGE_SIZE)
                return __va(phys_addr);
 
        return NULL;
index a0678250f88141136a422bb0012f8518819db863..5ba0be371a31cef17d07eaa7b1267ff391c2b302 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
 #include <linux/cpu.h>
+#include <linux/module.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
 #include <asm/i8253.h>
 
 #include <mach_apic.h>
+#include <mach_ipi.h>
 
 #include "io_ports.h"
 
+#ifndef CONFIG_XEN
+/*
+ * cpu_mask that denotes the CPUs that needs timer interrupt coming in as
+ * IPIs in place of local APIC timers
+ */
+static cpumask_t timer_bcast_ipi;
+#endif
+
 /*
  * Knob to control our willingness to enable the local APIC.
  */
@@ -73,6 +83,50 @@ void ack_bad_irq(unsigned int irq)
        ack_APIC_irq();
 }
 
+#ifdef CONFIG_XEN
+void switch_APIC_timer_to_ipi(void *cpumask) { }
+EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
+void switch_ipi_to_APIC_timer(void *cpumask) { }
+EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
+#else
+#ifndef CONFIG_SMP
+static void up_apic_timer_interrupt_call(struct pt_regs *regs)
+{
+       int cpu = smp_processor_id();
+
+       /*
+        * the NMI deadlock-detector uses this.
+        */
+       per_cpu(irq_stat, cpu).apic_timer_irqs++;
+
+       smp_local_timer_interrupt(regs);
+}
+#endif
+
+void smp_send_timer_broadcast_ipi(struct pt_regs *regs)
+{
+       cpumask_t mask;
+
+       cpus_and(mask, cpu_online_map, timer_bcast_ipi);
+       if (!cpus_empty(mask)) {
+#ifdef CONFIG_SMP
+               send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
+#else
+               /*
+                * We can directly call the apic timer interrupt handler
+                * in UP case. Minus all irq related functions
+                */
+               up_apic_timer_interrupt_call(regs);
+#endif
+       }
+}
+
+int setup_profiling_timer(unsigned int multiplier)
+{
+       return -EINVAL;
+}
+#endif
+
 /*
  * This initializes the IO-APIC and APIC hardware if this is
  * a UP kernel.
index 047e7953d7d093861707db7cd603bf391e8a111f..b09ee4933bd4873f5313936ac891741e05ba1e52 100644 (file)
@@ -20,9 +20,6 @@
 #include "cpu.h"
 
 #ifndef CONFIG_XEN
-DEFINE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
-EXPORT_PER_CPU_SYMBOL(cpu_gdt_table);
-
 DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
 EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
 #endif
@@ -212,7 +209,10 @@ static int __devinit have_cpuid_p(void)
 
 /* Do minimum CPU detection early.
    Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment.
-   The others are not touched to avoid unwanted side effects. */
+   The others are not touched to avoid unwanted side effects.
+
+   WARNING: this function is only called on the BP.  Don't add code here
+   that is supposed to run on all CPUs. */
 static void __init early_cpu_detect(void)
 {
        struct cpuinfo_x86 *c = &boot_cpu_data;
@@ -244,12 +244,6 @@ static void __init early_cpu_detect(void)
                if (cap0 & (1<<19))
                        c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
        }
-
-       early_intel_workaround(c);
-
-#ifdef CONFIG_X86_HT
-       phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff;
-#endif
 }
 
 void __devinit generic_identify(struct cpuinfo_x86 * c)
@@ -297,6 +291,12 @@ void __devinit generic_identify(struct cpuinfo_x86 * c)
                                get_model_name(c); /* Default name */
                }
        }
+
+       early_intel_workaround(c);
+
+#ifdef CONFIG_X86_HT
+       phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff;
+#endif
 }
 
 static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
@@ -606,11 +606,6 @@ void __cpuinit cpu_init(void)
 
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 
-       /*
-        * Delete NT
-        */
-       __asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl");
-
        /*
         * Set up and load the per-CPU TSS and LDT
         */
@@ -624,6 +619,11 @@ void __cpuinit cpu_init(void)
 
        load_LDT(&init_mm.context);
 
+#ifdef CONFIG_DOUBLEFAULT
+       /* Set up doublefault TSS pointer in the GDT */
+       __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
+#endif
+
        /* Clear %fs and %gs. */
        asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
 
index 2d6807942971262aa2570c46679aa3e4e8a2182f..d012631501515a8a10805ac2f2a7898492c3a845 100644 (file)
@@ -392,6 +392,7 @@ work_notifysig:                             # deal with pending signals and
 
        ALIGN
 work_notifysig_v86:
+#ifdef CONFIG_VM86
        pushl %ecx                      # save ti_flags for do_notify_resume
        call save_v86_state             # %eax contains pt_regs pointer
        popl %ecx
@@ -399,6 +400,7 @@ work_notifysig_v86:
        xorl %edx, %edx
        call do_notify_resume
        jmp resume_userspace
+#endif
 
        # perform syscall exit tracing
        ALIGN
@@ -843,6 +845,7 @@ ENTRY(fixup_4gb_segment)
        pushl $do_fixup_4gb_segment
        jmp error_code
 
+.section .rodata,"a"
 #include "syscall_table.S"
 
 syscall_table_size=(.-sys_call_table)
index f1ad2f9f8c3f980e1945f5c749d3d1bd4e43b120..41a8cc4f82c3f66f24563e8218257c8d02b9178f 100644 (file)
@@ -161,15 +161,20 @@ ENTRY(cpu_gdt_table)
        .quad 0x0000000000000000        /* 0x80 TSS descriptor */
        .quad 0x0000000000000000        /* 0x88 LDT descriptor */
 
-       /* Segments used for calling PnP BIOS */
+       /*
+        * Segments used for calling PnP BIOS have byte granularity.
+        * They code segments and data segments have fixed 64k limits,
+        * the transfer segment sizes are set at run time.
+        */
        .quad 0x0000000000000000        /* 0x90 32-bit code */
        .quad 0x0000000000000000        /* 0x98 16-bit code */
        .quad 0x0000000000000000        /* 0xa0 16-bit data */
        .quad 0x0000000000000000        /* 0xa8 16-bit data */
        .quad 0x0000000000000000        /* 0xb0 16-bit data */
+
        /*
         * The APM segments have byte granularity and their bases
-        * and limits are set at run time.
+        * are set at run time.  All have 64k limits.
         */
        .quad 0x0000000000000000        /* 0xb8 APM CS    code */
        .quad 0x0000000000000000        /* 0xc0 APM CS 16 code (16 bit) */
@@ -181,7 +186,9 @@ ENTRY(cpu_gdt_table)
        .quad 0x0000000000000000        /* 0xe8 - unused */
        .quad 0x0000000000000000        /* 0xf0 - unused */
        .quad 0x0000000000000000        /* 0xf8 - GDT entry 31: double-fault TSS */
-       .fill GDT_ENTRIES-32,8,0
+
+       /* Be sure this is zeroed to avoid false validations in Xen */
+       .fill PAGE_SIZE_asm / 8 - GDT_ENTRIES,8,0
 
 .org 0x3000
 ENTRY(default_ldt)
index 55502d58ac7d86918e819b6298a15e1e01dd7ea1..c0203975017a6f7081e247898d2b46f68032aa28 100644 (file)
@@ -45,5 +45,5 @@ EXPORT_SYMBOL(init_task);
  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
  * no more per-task TSS's.
  */ 
-DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS;
+DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS;
 
index 20c2ae1d2b8d6ccd28e48c849bcc64dddad3da39..cdce54f00328a6e94907d4f9b56da2f6a025eebd 100644 (file)
@@ -1701,7 +1701,7 @@ static void __init enable_IO_APIC(void)
        for(apic = 0; apic < nr_ioapics; apic++) {
                int pin;
                /* See if any of the pins is in ExtINT mode */
-               for(pin = 0; pin < nr_ioapic_registers[i]; pin++) {
+               for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
                        struct IO_APIC_route_entry entry;
                        spin_lock_irqsave(&ioapic_lock, flags);
                        *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
@@ -1775,8 +1775,8 @@ void disable_IO_APIC(void)
                entry.dest_mode       = 0; /* Physical */
                entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
-               entry.dest.physical.physical_dest = 0;
-
+               entry.dest.physical.physical_dest =
+                                       GET_APIC_ID(apic_read(APIC_ID));
 
                /*
                 * Add it to the IO-APIC irq-routing table:
index 59d42d964fa937852abdeddac04a7e066c7d43ee..fe395b146c94e931f080fa36555b78e173f2ab6d 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
index d202ff4988ff032a0e1ecee81b59c4e0c8c78d06..d4b97538e0a55a2b2d42025075a3bbe35cbd1d1c 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/cpu.h>
 #include <linux/delay.h>
 
-DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_maxaligned_in_smp;
+DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp;
 EXPORT_PER_CPU_SYMBOL(irq_stat);
 
 #ifndef CONFIG_X86_LOCAL_APIC
index fa738d152df4afcd5012ce8087f234f4790c956e..a0e148752610c98917b3384a6a88c52e4ccf6e24 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 //#define DEBUG /* pr_debug */
+#include <linux/capability.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
index 737d646a590557259855c1554be3572a8f3c182e..ed43c988116a5be382473383f98884c8cb6da246 100644 (file)
 int smp_found_config;
 unsigned int __initdata maxcpus = NR_CPUS;
 
+#ifdef CONFIG_HOTPLUG_CPU
+#define CPU_HOTPLUG_ENABLED    (1)
+#else
+#define CPU_HOTPLUG_ENABLED    (0)
+#endif
+
 /*
  * Various Linux-internal data structures created from the
  * MP-table.
@@ -220,14 +226,18 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m)
        cpu_set(num_processors, cpu_possible_map);
        num_processors++;
 
-       if ((num_processors > 8) &&
-           ((APIC_XAPIC(ver) &&
-            (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) ||
-            (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)))
-               def_to_bigsmp = 1;
-       else
-               def_to_bigsmp = 0;
-
+       if (CPU_HOTPLUG_ENABLED || (num_processors > 8)) {
+               switch (boot_cpu_data.x86_vendor) {
+               case X86_VENDOR_INTEL:
+                       if (!APIC_XAPIC(ver)) {
+                               def_to_bigsmp = 0;
+                               break;
+                       }
+                       /* If P4 and above fall through */
+               case X86_VENDOR_AMD:
+                       def_to_bigsmp = 1;
+               }
+       }
        bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
 }
 #else
index 2c86a17d8c872664bd909834e2e8e688edf71a9a..8fa736726c97dd9a2202ffa187bc9a7caec6225a 100644 (file)
 #include <xen/balloon.h>
 #include <asm/tlbflush.h>
 #include <asm/swiotlb.h>
+#include <asm/bug.h>
+
+#ifdef __x86_64__
+int iommu_merge __read_mostly = 0;
+EXPORT_SYMBOL(iommu_merge);
+
+dma_addr_t bad_dma_address __read_mostly;
+EXPORT_SYMBOL(bad_dma_address);
+
+/* This tells the BIO block layer to assume merging. Default to off
+   because we cannot guarantee merging later. */
+int iommu_bio_merge __read_mostly = 0;
+EXPORT_SYMBOL(iommu_bio_merge);
+
+__init int iommu_setup(char *p)
+{
+    return 1;
+}
+#endif
 
 struct dma_coherent_mem {
        void            *virt_base;
@@ -41,7 +60,9 @@ dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
 {
        int i, rc;
 
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
+       WARN_ON(nents == 0 || sg[0].length == 0);
 
        if (swiotlb) {
                rc = swiotlb_map_sg(hwdev, sg, nents, direction);
@@ -266,7 +287,9 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
 {
        dma_addr_t dma;
 
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
+       WARN_ON(size == 0);
 
        if (swiotlb) {
                dma = swiotlb_map_single(dev, ptr, size, direction);
@@ -285,7 +308,8 @@ void
 dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                 enum dma_data_direction direction)
 {
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
        if (swiotlb)
                swiotlb_unmap_single(dev, dma_addr, size, direction);
 }
index 0653e95fa052125c86bec9a60215a67335f39194..66fbe21e5a6465fbdeb9dc22eb2351ab1733d0d9 100644 (file)
 #include <asm/processor.h>
 #include <asm/i387.h>
 #include <asm/desc.h>
-#include <xen/interface/physdev.h>
-#include <xen/interface/vcpu.h>
+#include <asm/vm86.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif
 
+#include <xen/interface/physdev.h>
+#include <xen/interface/vcpu.h>
+
 #include <linux/err.h>
 
 #include <asm/tlbflush.h>
@@ -222,9 +224,7 @@ void show_regs(struct pt_regs * regs)
        cr0 = read_cr0();
        cr2 = read_cr2();
        cr3 = read_cr3();
-       if (current_cpu_data.x86 > 4) {
-               cr4 = read_cr4();
-       }
+       cr4 = read_cr4_safe();
        printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4);
        show_trace(NULL, &regs->esp);
 }
@@ -309,17 +309,7 @@ void flush_thread(void)
 
 void release_thread(struct task_struct *dead_task)
 {
-       if (dead_task->mm) {
-               // temporary debugging check
-               if (dead_task->mm->context.size) {
-                       printk("WARNING: dead process %8s still has LDT? <%p/%d>\n",
-                                       dead_task->comm,
-                                       dead_task->mm->context.ldt,
-                                       dead_task->mm->context.size);
-                       BUG();
-               }
-       }
-
+       BUG_ON(dead_task->mm);
        release_vm86_irqs(dead_task);
 }
 
@@ -340,18 +330,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
        struct task_struct *tsk;
        int err;
 
-       childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
-       /*
-        * The below -8 is to reserve 8 bytes on top of the ring0 stack.
-        * This is necessary to guarantee that the entire "struct pt_regs"
-        * is accessable even if the CPU haven't stored the SS/ESP registers
-        * on the stack (interrupt gate does not save these registers
-        * when switching to the same priv ring).
-        * Therefore beware: accessing the xss/esp fields of the
-        * "struct pt_regs" is possible, but they may contain the
-        * completely wrong values.
-        */
-       childregs = (struct pt_regs *) ((unsigned long) childregs - 8);
+       childregs = task_pt_regs(p);
        *childregs = *regs;
        childregs->eax = 0;
        childregs->esp = esp;
@@ -458,12 +437,7 @@ EXPORT_SYMBOL(dump_thread);
  */
 int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
 {
-       struct pt_regs ptregs;
-       
-       ptregs = *(struct pt_regs *)
-               ((unsigned long)tsk->thread_info +
-               /* see comments in copy_thread() about -8 */
-               THREAD_SIZE - sizeof(ptregs) - 8);
+       struct pt_regs ptregs = *task_pt_regs(tsk);
        ptregs.xcs &= 0xffff;
        ptregs.xds &= 0xffff;
        ptregs.xes &= 0xffff;
@@ -487,8 +461,8 @@ static inline void disable_tsc(struct task_struct *prev_p,
         * gcc should eliminate the ->thread_info dereference if
         * has_secure_computing returns 0 at compile time (SECCOMP=n).
         */
-       prev = prev_p->thread_info;
-       next = next_p->thread_info;
+       prev = task_thread_info(prev_p);
+       next = task_thread_info(next_p);
 
        if (has_secure_computing(prev) || has_secure_computing(next)) {
                /* slow path here */
@@ -707,7 +681,7 @@ unsigned long get_wchan(struct task_struct *p)
        int count = 0;
        if (!p || p == current || p->state == TASK_RUNNING)
                return 0;
-       stack_page = (unsigned long)p->thread_info;
+       stack_page = (unsigned long)task_stack_page(p);
        esp = p->thread.esp;
        if (!stack_page || esp < stack_page || esp > top_esp+stack_page)
                return 0;
index fcc6849b584e55220bd8620eb4edf4c16c558eb3..39d9ed110a0d0e19b9d9a4a30d5e6acd94ae01eb 100644 (file)
@@ -25,8 +25,7 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
 
        /* enable access to config space*/
        pci_read_config_byte(dev, 0xf4, &config);
-       config |= 0x2;
-       pci_write_config_byte(dev, 0xf4, config);
+       pci_write_config_byte(dev, 0xf4, config|0x2);
 
        /* read xTPR register */
        raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
@@ -39,9 +38,9 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
                (void)HYPERVISOR_dom0_op(&op);
        }
 
-       config &= ~0x2;
-       /* disable access to config space*/
-       pci_write_config_byte(dev, 0xf4, config);
+       /* put back the original value for config space*/
+       if (!(config & 0x2))
+               pci_write_config_byte(dev, 0xf4, config);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  quirk_intel_irqbalance);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  quirk_intel_irqbalance);
index d51bb3067f4fa3362dc016568d096c3e686ba842..c80c3c496007ed1bf428fea3619a36f8fde9dd46 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/notifier.h>
 #include <linux/kexec.h>
 #include <linux/crash_dump.h>
+#include <linux/dmi.h>
 
 #include <video/edid.h>
 
@@ -159,7 +160,6 @@ EXPORT_SYMBOL(ist_info);
 struct e820map e820;
 
 extern void early_cpu_init(void);
-extern void dmi_scan_machine(void);
 extern void generic_apic_probe(char *);
 extern int root_mountflags;
 
@@ -944,7 +944,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
                        }
                }
 #endif
-#ifdef CONFIG_CRASH_DUMP
+#ifdef CONFIG_PROC_VMCORE
                /* elfcorehdr= specifies the location of elf core header
                 * stored by the crashed kernel.
                 */
@@ -1001,6 +1001,12 @@ efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
        return 0;
 }
 
+static int __init
+efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
+{
+       memory_present(0, start, end);
+       return 0;
+}
 
 /*
  * Find the highest page frame number we have available
@@ -1012,6 +1018,7 @@ void __init find_max_pfn(void)
        max_pfn = 0;
        if (efi_enabled) {
                efi_memmap_walk(efi_find_max_pfn, &max_pfn);
+               efi_memmap_walk(efi_memory_present_wrapper, NULL);
                return;
        }
 
@@ -1026,6 +1033,7 @@ void __init find_max_pfn(void)
                        continue;
                if (end > max_pfn)
                        max_pfn = end;
+               memory_present(0, start, end);
        }
 }
 #else
@@ -1796,7 +1804,7 @@ void __init setup_arch(char **cmdline_p)
                if (s) {
                        extern void setup_early_printk(char *);
 
-                       setup_early_printk(s);
+                       setup_early_printk(strchr(s, '=') + 1);
                        printk("early console enabled\n");
                }
        }
index 4cd20871471f14dc54e3df821e9aaadc95d36d7b..6cc9c4b3adc2b9407ac696e6e082700aa1ef3ae0 100644 (file)
@@ -875,8 +875,7 @@ static inline struct task_struct * alloc_idle_task(int cpu)
                /* initialize thread_struct.  we really want to avoid destroy
                 * idle tread
                 */
-               idle->thread.esp = (unsigned long)(((struct pt_regs *)
-                       (THREAD_SIZE + (unsigned long) idle->thread_info)) - 1);
+               idle->thread.esp = (unsigned long)task_pt_regs(idle);
                init_idle(idle, cpu);
                return idle;
        }
@@ -903,6 +902,12 @@ static int __devinit do_boot_cpu(int apicid, int cpu)
        unsigned long start_eip;
        unsigned short nmi_high = 0, nmi_low = 0;
 
+       if (!cpu_gdt_descr[cpu].address &&
+           !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+               printk("Failed to allocate GDT for CPU %d\n", cpu);
+               return 1;
+       }
+
        ++cpucount;
 
        /*
@@ -1090,6 +1095,7 @@ static void smp_tune_scheduling (void)
                        cachesize = 16; /* Pentiums, 2x8kB cache */
                        bandwidth = 100;
                }
+               max_cache_size = cachesize * 1024;
        }
 }
 
index a58c168a29b1420d609246f536c7601195176767..8986ab8dfb5eeb30467e189c985c6119c46107d1 100644 (file)
 #include <asm/uaccess.h>
 #include <xen/interface/memory.h>
 
+#if defined(CONFIG_SWIOTLB)
+extern void swiotlb_init(void);
+int swiotlb;
+EXPORT_SYMBOL(swiotlb);
+#endif
+
 #define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1)))
 
 #define SG_ENT_PHYS_ADDRESS(sg)        (page_to_phys((sg)->page) + (sg)->offset)
index dd0ead71f30785b84cb8e3da3d27a134c58de9b3..6e75596e2932381e1f4a7566c2f5dc91fcb7a5f0 100644 (file)
@@ -109,33 +109,38 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
                p < (void *)tinfo + THREAD_SIZE - 3;
 }
 
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
+{
+       printk(log_lvl);
+       printk(" [<%08lx>] ", addr);
+       print_symbol("%s", addr);
+       printk("\n");
+}
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
-                               unsigned long *stack, unsigned long ebp)
+                               unsigned long *stack, unsigned long ebp,
+                               char *log_lvl)
 {
        unsigned long addr;
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
-               printk(" [<%08lx>] ", addr);
-               print_symbol("%s", addr);
-               printk("\n");
+               print_addr_and_symbol(addr, log_lvl);
                ebp = *(unsigned long *)ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
                addr = *stack++;
-               if (__kernel_text_address(addr)) {
-                       printk(" [<%08lx>]", addr);
-                       print_symbol(" %s", addr);
-                       printk("\n");
-               }
+               if (__kernel_text_address(addr))
+                       print_addr_and_symbol(addr, log_lvl);
        }
 #endif
        return ebp;
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+static void show_trace_log_lvl(struct task_struct *task,
+                              unsigned long *stack, char *log_lvl)
 {
        unsigned long ebp;
 
@@ -154,15 +159,21 @@ void show_trace(struct task_struct *task, unsigned long * stack)
                struct thread_info *context;
                context = (struct thread_info *)
                        ((unsigned long)stack & (~(THREAD_SIZE - 1)));
-               ebp = print_context_stack(context, stack, ebp);
+               ebp = print_context_stack(context, stack, ebp, log_lvl);
                stack = (unsigned long*)context->previous_esp;
                if (!stack)
                        break;
-               printk(" =======================\n");
+               printk(KERN_EMERG " =======================\n");
        }
 }
 
-void show_stack(struct task_struct *task, unsigned long *esp)
+void show_trace(struct task_struct *task, unsigned long * stack)
+{
+       show_trace_log_lvl(task, stack, "");
+}
+
+static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
+                              char *log_lvl)
 {
        unsigned long *stack;
        int i;
@@ -175,15 +186,26 @@ void show_stack(struct task_struct *task, unsigned long *esp)
        }
 
        stack = esp;
+       printk(log_lvl);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0))
-                       printk("\n       ");
+               if (i && ((i % 8) == 0)) {
+                       printk("\n");
+                       printk(log_lvl);
+                       printk("       ");
+               }
                printk("%08lx ", *stack++);
        }
-       printk("\nCall Trace:\n");
-       show_trace(task, esp);
+       printk("\n");
+       printk(log_lvl);
+       printk("Call Trace:\n");
+       show_trace_log_lvl(task, esp, log_lvl);
+}
+
+void show_stack(struct task_struct *task, unsigned long *esp)
+{
+       show_stack_log_lvl(task, esp, "");
 }
 
 /*
@@ -213,18 +235,18 @@ void show_registers(struct pt_regs *regs)
                ss = regs->xss & 0xffff;
        }
        print_modules();
-       printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\nEFLAGS: %08lx"
-                       "   (%s) \n",
+       printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
+                       "EFLAGS: %08lx   (%s) \n",
                smp_processor_id(), 0xffff & regs->xcs, regs->eip,
                print_tainted(), regs->eflags, system_utsname.release);
-       print_symbol("EIP is at %s\n", regs->eip);
-       printk("eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
+       print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip);
+       printk(KERN_EMERG "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
                regs->eax, regs->ebx, regs->ecx, regs->edx);
-       printk("esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
+       printk(KERN_EMERG "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
                regs->esi, regs->edi, regs->ebp, esp);
-       printk("ds: %04x   es: %04x   ss: %04x\n",
+       printk(KERN_EMERG "ds: %04x   es: %04x   ss: %04x\n",
                regs->xds & 0xffff, regs->xes & 0xffff, ss);
-       printk("Process %s (pid: %d, threadinfo=%p task=%p)",
+       printk(KERN_EMERG "Process %s (pid: %d, threadinfo=%p task=%p)",
                current->comm, current->pid, current_thread_info(), current);
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -233,10 +255,10 @@ void show_registers(struct pt_regs *regs)
        if (in_kernel) {
                u8 __user *eip;
 
-               printk("\nStack: ");
-               show_stack(NULL, (unsigned long*)esp);
+               printk("\n" KERN_EMERG "Stack: ");
+               show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
 
-               printk("Code: ");
+               printk(KERN_EMERG "Code: ");
 
                eip = (u8 __user *)regs->eip - 43;
                for (i = 0; i < 64; i++, eip++) {
@@ -277,15 +299,15 @@ static void handle_BUG(struct pt_regs *regs)
                (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
                file = "<bad filename>";
 
-       printk("------------[ cut here ]------------\n");
-       printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line);
+       printk(KERN_EMERG "------------[ cut here ]------------\n");
+       printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
 
 no_bug:
        return;
 
        /* Here we know it was a BUG but file-n-line is unavailable */
 bug:
-       printk("Kernel BUG\n");
+       printk(KERN_EMERG "Kernel BUG\n");
 }
 
 /* This is gone through when something in the kernel
@@ -303,28 +325,35 @@ void die(const char * str, struct pt_regs * regs, long err)
                .lock_owner_depth =     0
        };
        static int die_counter;
+       unsigned long flags;
 
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
-               spin_lock_irq(&die.lock);
+               spin_lock_irqsave(&die.lock, flags);
                die.lock_owner = smp_processor_id();
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
        }
+       else
+               local_save_flags(flags);
 
        if (++die.lock_owner_depth < 3) {
                int nl = 0;
                handle_BUG(regs);
-               printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
+               printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
 #ifdef CONFIG_PREEMPT
-               printk("PREEMPT ");
+               printk(KERN_EMERG "PREEMPT ");
                nl = 1;
 #endif
 #ifdef CONFIG_SMP
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("SMP ");
                nl = 1;
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("DEBUG_PAGEALLOC");
                nl = 1;
 #endif
@@ -333,11 +362,11 @@ void die(const char * str, struct pt_regs * regs, long err)
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
                show_registers(regs);
        } else
-               printk(KERN_ERR "Recursive die() failure, output suppressed\n");
+               printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
 
        bust_spinlocks(0);
        die.lock_owner = -1;
-       spin_unlock_irq(&die.lock);
+       spin_unlock_irqrestore(&die.lock, flags);
 
        if (kexec_should_crash(current))
                crash_kexec(regs);
@@ -449,7 +478,7 @@ DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
 #endif
 DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, regs->eip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip)
 DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
@@ -508,8 +537,10 @@ gp_in_kernel:
 
 static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("Uhhuh. NMI received. Dazed and confused, but trying to continue\n");
-       printk("You probably have a hardware problem with your RAM chips\n");
+       printk(KERN_EMERG "Uhhuh. NMI received. Dazed and confused, but trying "
+                       "to continue\n");
+       printk(KERN_EMERG "You probably have a hardware problem with your RAM "
+                       "chips\n");
 
        /* Clear and disable the memory parity error line. */
        clear_mem_error(reason);
@@ -517,7 +548,7 @@ static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 
 static void io_check_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("NMI: IOCK error (debug interrupt?)\n");
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
 
        /* Re-enable the IOCK line, wait for a few seconds */
@@ -554,11 +585,11 @@ void die_nmi (struct pt_regs *regs, const char *msg)
        * to get a message out.
        */
        bust_spinlocks(1);
-       printk(msg);
+       printk(KERN_EMERG "%s", msg);
        printk(" on CPU%d, eip %08lx, registers:\n",
                smp_processor_id(), regs->eip);
        show_registers(regs);
-       printk("console shuts up ...\n");
+       printk(KERN_EMERG "console shuts up ...\n");
        console_silent();
        spin_unlock(&nmi_print_lock);
        bust_spinlocks(0);
@@ -957,8 +988,8 @@ asmlinkage void math_state_restore(struct pt_regs regs)
 
 asmlinkage void math_emulate(long arg)
 {
-       printk("math-emulation not enabled and no coprocessor found.\n");
-       printk("killing %s.\n",current->comm);
+       printk(KERN_EMERG "math-emulation not enabled and no coprocessor found.\n");
+       printk(KERN_EMERG "killing %s.\n",current->comm);
        force_sig(SIGFPE,current);
        schedule();
 }
@@ -989,7 +1020,7 @@ static trap_info_t trap_table[] = {
        {  1, 0|4, __KERNEL_CS, (unsigned long)debug                    },
        {  3, 3|4, __KERNEL_CS, (unsigned long)int3                     },
        {  4, 3, __KERNEL_CS, (unsigned long)overflow                   },
-       {  5, 3, __KERNEL_CS, (unsigned long)bounds                     },
+       {  5, 0, __KERNEL_CS, (unsigned long)bounds                     },
        {  6, 0, __KERNEL_CS, (unsigned long)invalid_op                 },
        {  7, 0|4, __KERNEL_CS, (unsigned long)device_not_available     },
        {  9, 0, __KERNEL_CS, (unsigned long)coprocessor_segment_overrun },
@@ -1013,6 +1044,28 @@ void __init trap_init(void)
 {
        HYPERVISOR_set_trap_table(trap_table);
 
+       if (cpu_has_fxsr) {
+               /*
+                * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
+                * Generates a compile-time "error: zero width for bit-field" if
+                * the alignment is wrong.
+                */
+               struct fxsrAlignAssert {
+                       int _:!(offsetof(struct task_struct,
+                                       thread.i387.fxsave) & 15);
+               };
+
+               printk(KERN_INFO "Enabling fast FPU save and restore... ");
+               set_in_cr4(X86_CR4_OSFXSR);
+               printk("done.\n");
+       }
+       if (cpu_has_xmm) {
+               printk(KERN_INFO "Enabling unmasked SIMD FPU exception "
+                               "support... ");
+               set_in_cr4(X86_CR4_OSXMMEXCPT);
+               printk("done.\n");
+       }
+
        /*
         * default LDT is a single-entry callgate to lcall7 for iBCS
         * and a callgate to lcall27 for Solaris/x86 binaries
index 4aa7f5e7092b59f12159249c281eb0bdca4d33be..8416df44236576bebdcbcf21f7e76cadef34fbf7 100644 (file)
@@ -112,33 +112,38 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
                p < (void *)tinfo + THREAD_SIZE - 3;
 }
 
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
+{
+       printk(log_lvl);
+       printk(" [<%08lx>] ", addr);
+       print_symbol("%s", addr);
+       printk("\n");
+}
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
-                               unsigned long *stack, unsigned long ebp)
+                               unsigned long *stack, unsigned long ebp,
+                               char *log_lvl)
 {
        unsigned long addr;
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
-               printk(" [<%08lx>] ", addr);
-               print_symbol("%s", addr);
-               printk("\n");
+               print_addr_and_symbol(addr, log_lvl);
                ebp = *(unsigned long *)ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
                addr = *stack++;
-               if (__kernel_text_address(addr)) {
-                       printk(" [<%08lx>]", addr);
-                       print_symbol(" %s", addr);
-                       printk("\n");
-               }
+               if (__kernel_text_address(addr))
+                       print_addr_and_symbol(addr, log_lvl);
        }
 #endif
        return ebp;
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+static void show_trace_log_lvl(struct task_struct *task,
+                              unsigned long *stack, char *log_lvl)
 {
        unsigned long ebp;
 
@@ -157,15 +162,21 @@ void show_trace(struct task_struct *task, unsigned long * stack)
                struct thread_info *context;
                context = (struct thread_info *)
                        ((unsigned long)stack & (~(THREAD_SIZE - 1)));
-               ebp = print_context_stack(context, stack, ebp);
+               ebp = print_context_stack(context, stack, ebp, log_lvl);
                stack = (unsigned long*)context->previous_esp;
                if (!stack)
                        break;
-               printk(" =======================\n");
+               printk(KERN_EMERG " =======================\n");
        }
 }
 
-void show_stack(struct task_struct *task, unsigned long *esp)
+void show_trace(struct task_struct *task, unsigned long * stack)
+{
+       show_trace_log_lvl(task, stack, "");
+}
+
+static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
+                              char *log_lvl)
 {
        unsigned long *stack;
        int i;
@@ -178,15 +189,26 @@ void show_stack(struct task_struct *task, unsigned long *esp)
        }
 
        stack = esp;
+       printk(log_lvl);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0))
-                       printk("\n       ");
+               if (i && ((i % 8) == 0)) {
+                       printk("\n");
+                       printk(log_lvl);
+                       printk("       ");
+               }
                printk("%08lx ", *stack++);
        }
-       printk("\nCall Trace:\n");
-       show_trace(task, esp);
+       printk("\n");
+       printk(log_lvl);
+       printk("Call Trace:\n");
+       show_trace_log_lvl(task, esp, log_lvl);
+}
+
+void show_stack(struct task_struct *task, unsigned long *esp)
+{
+       show_stack_log_lvl(task, esp, "");
 }
 
 /*
@@ -216,18 +238,18 @@ void show_registers(struct pt_regs *regs)
                ss = regs->xss & 0xffff;
        }
        print_modules();
-       printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\nEFLAGS: %08lx"
-                       "   (%s) \n",
+       printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
+                       "EFLAGS: %08lx   (%s) \n",
                smp_processor_id(), 0xffff & regs->xcs, regs->eip,
                print_tainted(), regs->eflags, system_utsname.release);
-       print_symbol("EIP is at %s\n", regs->eip);
-       printk("eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
+       print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip);
+       printk(KERN_EMERG "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
                regs->eax, regs->ebx, regs->ecx, regs->edx);
-       printk("esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
+       printk(KERN_EMERG "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
                regs->esi, regs->edi, regs->ebp, esp);
-       printk("ds: %04x   es: %04x   ss: %04x\n",
+       printk(KERN_EMERG "ds: %04x   es: %04x   ss: %04x\n",
                regs->xds & 0xffff, regs->xes & 0xffff, ss);
-       printk("Process %s (pid: %d, threadinfo=%p task=%p)",
+       printk(KERN_EMERG "Process %s (pid: %d, threadinfo=%p task=%p)",
                current->comm, current->pid, current_thread_info(), current);
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -236,10 +258,10 @@ void show_registers(struct pt_regs *regs)
        if (in_kernel) {
                u8 __user *eip;
 
-               printk("\nStack: ");
-               show_stack(NULL, (unsigned long*)esp);
+               printk("\n" KERN_EMERG "Stack: ");
+               show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
 
-               printk("Code: ");
+               printk(KERN_EMERG "Code: ");
 
                eip = (u8 __user *)regs->eip - 43;
                for (i = 0; i < 64; i++, eip++) {
@@ -280,15 +302,15 @@ static void handle_BUG(struct pt_regs *regs)
                (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
                file = "<bad filename>";
 
-       printk("------------[ cut here ]------------\n");
-       printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line);
+       printk(KERN_EMERG "------------[ cut here ]------------\n");
+       printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
 
 no_bug:
        return;
 
        /* Here we know it was a BUG but file-n-line is unavailable */
 bug:
-       printk("Kernel BUG\n");
+       printk(KERN_EMERG "Kernel BUG\n");
 }
 
 /* This is gone through when something in the kernel
@@ -306,28 +328,35 @@ void die(const char * str, struct pt_regs * regs, long err)
                .lock_owner_depth =     0
        };
        static int die_counter;
+       unsigned long flags;
 
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
-               spin_lock_irq(&die.lock);
+               spin_lock_irqsave(&die.lock, flags);
                die.lock_owner = smp_processor_id();
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
        }
+       else
+               local_save_flags(flags);
 
        if (++die.lock_owner_depth < 3) {
                int nl = 0;
                handle_BUG(regs);
-               printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
+               printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
 #ifdef CONFIG_PREEMPT
-               printk("PREEMPT ");
+               printk(KERN_EMERG "PREEMPT ");
                nl = 1;
 #endif
 #ifdef CONFIG_SMP
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("SMP ");
                nl = 1;
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("DEBUG_PAGEALLOC");
                nl = 1;
 #endif
@@ -336,11 +365,11 @@ void die(const char * str, struct pt_regs * regs, long err)
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
                show_registers(regs);
        } else
-               printk(KERN_ERR "Recursive die() failure, output suppressed\n");
+               printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
 
        bust_spinlocks(0);
        die.lock_owner = -1;
-       spin_unlock_irq(&die.lock);
+       spin_unlock_irqrestore(&die.lock, flags);
 
        if (kexec_should_crash(current))
                crash_kexec(regs);
@@ -452,7 +481,7 @@ DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
 #endif
 DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, regs->eip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
 DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
@@ -524,8 +553,10 @@ gp_in_kernel:
 
 static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("Uhhuh. NMI received. Dazed and confused, but trying to continue\n");
-       printk("You probably have a hardware problem with your RAM chips\n");
+       printk(KERN_EMERG "Uhhuh. NMI received. Dazed and confused, but trying "
+                       "to continue\n");
+       printk(KERN_EMERG "You probably have a hardware problem with your RAM "
+                       "chips\n");
 
        /* Clear and disable the memory parity error line. */
        clear_mem_error(reason);
@@ -533,7 +564,7 @@ static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 
 static void io_check_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("NMI: IOCK error (debug interrupt?)\n");
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
 
        /* Re-enable the IOCK line, wait for a few seconds */
@@ -570,11 +601,11 @@ void die_nmi (struct pt_regs *regs, const char *msg)
        * to get a message out.
        */
        bust_spinlocks(1);
-       printk(msg);
+       printk(KERN_EMERG "%s", msg);
        printk(" on CPU%d, eip %08lx, registers:\n",
                smp_processor_id(), regs->eip);
        show_registers(regs);
-       printk("console shuts up ...\n");
+       printk(KERN_EMERG "console shuts up ...\n");
        console_silent();
        spin_unlock(&nmi_print_lock);
        bust_spinlocks(0);
@@ -980,8 +1011,8 @@ asmlinkage void math_state_restore(struct pt_regs regs)
 
 asmlinkage void math_emulate(long arg)
 {
-       printk("math-emulation not enabled and no coprocessor found.\n");
-       printk("killing %s.\n",current->comm);
+       printk(KERN_EMERG "math-emulation not enabled and no coprocessor found.\n");
+       printk(KERN_EMERG "killing %s.\n",current->comm);
        force_sig(SIGFPE,current);
        schedule();
 }
@@ -1068,9 +1099,9 @@ void __init trap_init(void)
        set_trap_gate(0,&divide_error);
        set_intr_gate(1,&debug);
        set_intr_gate(2,&nmi);
-       set_system_intr_gate(3, &int3); /* int3-5 can be called from all */
+       set_system_intr_gate(3, &int3); /* int3/4 can be called from all */
        set_system_gate(4,&overflow);
-       set_system_gate(5,&bounds);
+       set_trap_gate(5,&bounds);
        set_trap_gate(6,&invalid_op);
        set_trap_gate(7,&device_not_available);
        set_task_gate(8,GDT_ENTRY_DOUBLEFAULT_TSS);
@@ -1088,6 +1119,28 @@ void __init trap_init(void)
 #endif
        set_trap_gate(19,&simd_coprocessor_error);
 
+       if (cpu_has_fxsr) {
+               /*
+                * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
+                * Generates a compile-time "error: zero width for bit-field" if
+                * the alignment is wrong.
+                */
+               struct fxsrAlignAssert {
+                       int _:!(offsetof(struct task_struct,
+                                       thread.i387.fxsave) & 15);
+               };
+
+               printk(KERN_INFO "Enabling fast FPU save and restore... ");
+               set_in_cr4(X86_CR4_OSFXSR);
+               printk("done.\n");
+       }
+       if (cpu_has_xmm) {
+               printk(KERN_INFO "Enabling unmasked SIMD FPU exception "
+                               "support... ");
+               set_in_cr4(X86_CR4_OSXMMEXCPT);
+               printk("done.\n");
+       }
+
        set_system_gate(SYSCALL_VECTOR,&system_call);
 
        /*
index 99f433cde30c00463eba53dbaa6ace8d1ce6afca..349bdc90c9c04e2ea23c487fbd172dcf3ee8d9ff 100644 (file)
 
 extern unsigned long *contiguous_bitmap;
 
-#if defined(CONFIG_SWIOTLB)
-extern void swiotlb_init(void);
-int swiotlb;
-EXPORT_SYMBOL(swiotlb);
-#endif
-
 unsigned int __VMALLOC_RESERVE = 128 << 20;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -315,7 +309,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base)
        pkmap_page_table = pte; 
 }
 
-static void __devinit free_new_highpage(struct page *page, int pfn)
+static void __meminit free_new_highpage(struct page *page, int pfn)
 {
        set_page_count(page, 1);
        if (pfn < xen_start_info->nr_pages)
@@ -816,6 +810,30 @@ void free_initmem(void)
        printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (__init_end - __init_begin) >> 10);
 }
 
+#ifdef CONFIG_DEBUG_RODATA
+
+extern char __start_rodata, __end_rodata;
+void mark_rodata_ro(void)
+{
+       unsigned long addr = (unsigned long)&__start_rodata;
+
+       for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO);
+
+       printk ("Write protecting the kernel read-only data: %luk\n",
+                       (unsigned long)(&__end_rodata - &__start_rodata) >> 10);
+
+       /*
+        * change_page_attr() requires a global_flush_tlb() call after it.
+        * We do this after the printk so that if something went wrong in the
+        * change, the printk gets out at least to give a better debug hint
+        * of who is the culprit.
+        */
+       global_flush_tlb();
+}
+#endif
+
+
 #ifdef CONFIG_BLK_DEV_INITRD
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
index 53d08aaca6c5fa41e83e89e62b2d4938cdbdffb1..db0b6d12320cc896ccd5f31ee4c5213419675d79 100644 (file)
@@ -78,7 +78,7 @@ static inline struct irq_routing_table * pirq_check_routing_table(u8 *addr)
        for (i=0; i < rt->size; i++)
                sum += addr[i];
        if (!sum) {
-               DBG("PCI: Interrupt Routing Table found at 0x%p\n", rt);
+               DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", rt);
                return rt;
        }
        return NULL;
@@ -131,7 +131,7 @@ static void __init pirq_peer_trick(void)
 #ifdef DEBUG
                {
                        int j;
-                       DBG("%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot);
+                       DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot);
                        for(j=0; j<4; j++)
                                DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap);
                        DBG("\n");
@@ -163,10 +163,10 @@ void eisa_set_level_irq(unsigned int irq)
                return;
 
        eisa_irq_mask |= (1 << irq);
-       printk("PCI: setting IRQ %u as level-triggered\n", irq);
+       printk(KERN_DEBUG "PCI: setting IRQ %u as level-triggered\n", irq);
        val = inb(port);
        if (!(val & mask)) {
-               DBG(" -> edge");
+               DBG(KERN_DEBUG " -> edge");
                outb(val | mask, port);
        }
 }
@@ -680,11 +680,11 @@ static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router,
        {
        case PCI_DEVICE_ID_AL_M1533:
        case PCI_DEVICE_ID_AL_M1563:
-               printk("PCI: Using ALI IRQ Router\n");
-                       r->name = "ALI";
-                       r->get = pirq_ali_get;
-                       r->set = pirq_ali_set;
-                       return 1;
+               printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n");
+               r->name = "ALI";
+               r->get = pirq_ali_get;
+               r->set = pirq_ali_set;
+               return 1;
        }
        return 0;
 }
@@ -752,12 +752,13 @@ static void __init pirq_find_router(struct irq_router *r)
        r->get = NULL;
        r->set = NULL;
        
-       DBG("PCI: Attempting to find IRQ router for %04x:%04x\n",
+       DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n",
            rt->rtr_vendor, rt->rtr_device);
 
        pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn);
        if (!pirq_router_dev) {
-               DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
+               DBG(KERN_DEBUG "PCI: Interrupt router not found at "
+                       "%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
                return;
        }
 
@@ -802,7 +803,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
        /* Find IRQ pin */
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
        if (!pin) {
-               DBG(" -> no interrupt pin\n");
+               DBG(KERN_DEBUG " -> no interrupt pin\n");
                return 0;
        }
        pin = pin - 1;
@@ -812,16 +813,16 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
        if (!pirq_table)
                return 0;
        
-       DBG("IRQ for %s[%c]", pci_name(dev), 'A' + pin);
+       DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin);
        info = pirq_get_info(dev);
        if (!info) {
-               DBG(" -> not found in routing table\n");
+               DBG(" -> not found in routing table\n" KERN_DEBUG);
                return 0;
        }
        pirq = info->irq[pin].link;
        mask = info->irq[pin].bitmap;
        if (!pirq) {
-               DBG(" -> not routed\n");
+               DBG(" -> not routed\n" KERN_DEBUG);
                return 0;
        }
        DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, pirq_table->exclusive_irqs);
@@ -849,9 +850,12 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
         * reported by the device if possible.
         */
        newirq = dev->irq;
-       if (!((1 << newirq) & mask)) {
+       if (newirq && !((1 << newirq) & mask)) {
                if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0;
-               else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't match PIRQ mask - try pci=usepirqmask\n", newirq, pci_name(dev));
+               else printk("\n" KERN_WARNING
+                       "PCI: IRQ %i for device %s doesn't match PIRQ mask "
+                       "- try pci=usepirqmask\n" KERN_DEBUG, newirq,
+                       pci_name(dev));
        }
        if (!newirq && assign) {
                for (i = 0; i < 16; i++) {
@@ -926,14 +930,14 @@ static void __init pcibios_fixup_irqs(void)
        struct pci_dev *dev = NULL;
        u8 pin;
 
-       DBG("PCI: IRQ fixup\n");
+       DBG(KERN_DEBUG "PCI: IRQ fixup\n");
        while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                /*
                 * If the BIOS has set an out of range IRQ number, just ignore it.
                 * Also keep track of which IRQ's are already in use.
                 */
                if (dev->irq >= 16) {
-                       DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq);
+                       DBG(KERN_DEBUG "%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq);
                        dev->irq = 0;
                }
                /* If the IRQ is already assigned to a PCI device, ignore its ISA use penalty */
@@ -1042,7 +1046,7 @@ static struct dmi_system_id __initdata pciirq_dmi_table[] = {
 
 static int __init pcibios_irq_init(void)
 {
-       DBG("PCI: IRQ init\n");
+       DBG(KERN_DEBUG "PCI: IRQ init\n");
 
        if (pcibios_enable_irq || raw_pci_ops == NULL)
                return 0;
index a07c2964e1c91bbed601c3ff36dfff6ee2e148b2..3b96f6ba80c606f329c863bbd044ab6765cff878 100644 (file)
@@ -26,10 +26,6 @@ config MMU
        bool
        default y
 
-config SWIOTLB
-       bool
-       default y
-
 config RWSEM_XCHGADD_ALGORITHM
        bool
        default y
@@ -101,23 +97,16 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
        bool
        default y
 
-config IA64_UNCACHED_ALLOCATOR
-       bool
-       select GENERIC_ALLOCATOR
-
-config DMA_IS_DMA32
-       bool
-       default y
-
 choice
        prompt "System type"
        default IA64_GENERIC
 
 config IA64_GENERIC
        bool "generic"
-       select ACPI
        select NUMA
        select ACPI_NUMA
+       select VIRTUAL_MEM_MAP
+       select DISCONTIGMEM
        help
          This selects the system type of your hardware.  A "generic" kernel
          will run on any supported IA-64 system.  However, if you configure
@@ -215,21 +204,6 @@ config IA64_PAGE_SIZE_64KB
 
 endchoice
 
-choice
-       prompt "Page Table Levels"
-       default PGTABLE_3
-
-config PGTABLE_3
-       bool "3 Levels"
-
-config PGTABLE_4
-       depends on !IA64_PAGE_SIZE_64KB
-       bool "4 Levels"
-
-endchoice
-
-source kernel/Kconfig.hz
-
 config IA64_BRL_EMU
        bool
        depends on ITANIUM
@@ -242,6 +216,40 @@ config IA64_L1_CACHE_SHIFT
        default "6" if ITANIUM
 
 # align cache-sensitive data to 64 bytes
+config NUMA
+       bool "NUMA support"
+       depends on !IA64_HP_SIM
+       default y if IA64_SGI_SN2
+       select ACPI_NUMA
+       help
+         Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+         Access).  This option is for configuring high-end multiprocessor
+         server systems.  If in doubt, say N.
+
+config VIRTUAL_MEM_MAP
+       bool "Virtual mem map"
+       default y if !IA64_HP_SIM
+       help
+         Say Y to compile the kernel with support for a virtual mem map.
+         This code also only takes effect if a memory hole of greater than
+         1 Gb is found during boot.  You must turn this option on if you
+         require the DISCONTIGMEM option for your machine. If you are
+         unsure, say Y.
+
+config HOLES_IN_ZONE
+       bool
+       default y if VIRTUAL_MEM_MAP
+
+config DISCONTIGMEM
+       bool "Discontiguous memory support"
+       depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB) && NUMA && VIRTUAL_MEM_MAP
+       default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
+       help
+         Say Y to support efficient handling of discontiguous physical memory,
+         for architectures which are either NUMA (Non-Uniform Memory Access)
+         or have huge holes in the physical address space for other reasons.
+         See <file:Documentation/vm/numa> for more.
+
 config IA64_CYCLONE
        bool "Cyclone (EXA) Time Source support"
        help
@@ -253,10 +261,16 @@ config IOSAPIC
        depends on !IA64_HP_SIM
        default y
 
+config IA64_SGI_SN_SIM
+       bool "SGI Medusa Simulator Support"
+       depends on IA64_SGI_SN2
+       help
+         If you are compiling a kernel that will run under SGI's IA-64
+         simulator (Medusa) then say Y, otherwise say N.
+
 config IA64_SGI_SN_XP
        tristate "Support communication between SGI SSIs"
-       depends on IA64_GENERIC || IA64_SGI_SN2
-       select IA64_UNCACHED_ALLOCATOR
+       depends on MSPEC
        help
          An SGI machine can be divided into multiple Single System
          Images which act independently of each other and have
@@ -265,10 +279,8 @@ config IA64_SGI_SN_XP
          based on a network adapter and DMA messaging.
 
 config FORCE_MAX_ZONEORDER
-       int "MAX_ORDER (11 - 17)"  if !HUGETLB_PAGE
-       range 11 17  if !HUGETLB_PAGE
-       default "17" if HUGETLB_PAGE
-       default "11"
+       int
+       default "18"
 
 config SMP
        bool "Symmetric multi-processing support"
@@ -289,8 +301,8 @@ config SMP
          If you don't know what to do here, say N.
 
 config NR_CPUS
-       int "Maximum number of CPUs (2-1024)"
-       range 2 1024
+       int "Maximum number of CPUs (2-512)"
+       range 2 512
        depends on SMP
        default "64"
        help
@@ -331,59 +343,10 @@ config PREEMPT
           Say Y here if you are building a kernel for a desktop, embedded
           or real-time system.  Say N if you are unsure.
 
-source "mm/Kconfig"
-
-config ARCH_SELECT_MEMORY_MODEL
-       def_bool y
-
-config ARCH_DISCONTIGMEM_ENABLE
-       def_bool y
-       help
-         Say Y to support efficient handling of discontiguous physical memory,
-         for architectures which are either NUMA (Non-Uniform Memory Access)
-         or have huge holes in the physical address space for other reasons.
-         See <file:Documentation/vm/numa> for more.
-
-config ARCH_FLATMEM_ENABLE
-       def_bool y
-
-config ARCH_SPARSEMEM_ENABLE
-       def_bool y
-       depends on ARCH_DISCONTIGMEM_ENABLE
-
-config ARCH_DISCONTIGMEM_DEFAULT
-       def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
-       depends on ARCH_DISCONTIGMEM_ENABLE
-
-config NUMA
-       bool "NUMA support"
-       depends on !IA64_HP_SIM && !FLATMEM
-       default y if IA64_SGI_SN2
-       help
-         Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-         Access).  This option is for configuring high-end multiprocessor
-         server systems.  If in doubt, say N.
-
-# VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent.
-# VIRTUAL_MEM_MAP has been retained for historical reasons.
-config VIRTUAL_MEM_MAP
-       bool "Virtual mem map"
-       depends on !SPARSEMEM
-       default y if !IA64_HP_SIM
-       help
-         Say Y to compile the kernel with support for a virtual mem map.
-         This code also only takes effect if a memory hole of greater than
-         1 Gb is found during boot.  You must turn this option on if you
-         require the DISCONTIGMEM option for your machine. If you are
-         unsure, say Y.
-
-config HOLES_IN_ZONE
+config HAVE_DEC_LOCK
        bool
-       default y if VIRTUAL_MEM_MAP
-
-config HAVE_ARCH_EARLY_PFN_TO_NID
-       def_bool y
-       depends on NEED_MULTIPLE_NODES
+       depends on (SMP || PREEMPT)
+       default y
 
 config IA32_SUPPORT
        bool "Support for Linux/x86 binaries"
@@ -421,6 +384,11 @@ config IA64_PALINFO
          To use this option, you have to ensure that the "/proc file system
          support" (CONFIG_PROC_FS) is enabled, too.
 
+config ACPI_DEALLOCATE_IRQ
+       bool
+       depends on IOSAPIC && EXPERIMENTAL
+       default y
+
 source "drivers/firmware/Kconfig"
 
 source "fs/Kconfig.binfmt"
@@ -429,13 +397,35 @@ endmenu
 
 menu "Power management and ACPI"
 
-source "kernel/power/Kconfig"
-
-source "drivers/acpi/Kconfig"
+config PM
+       bool "Power Management support"
+       depends on !IA64_HP_SIM
+       default y
+       help
+         "Power Management" means that parts of your computer are shut
+         off or put into a power conserving "sleep" mode if they are not
+         being used.  There are two competing standards for doing this: APM
+         and ACPI.  If you want to use either one, say Y here and then also
+         to the requisite support below.
+
+         Power Management is most important for battery powered laptop
+         computers; if you have a laptop, check out the Linux Laptop home
+         page on the WWW at <http://www.linux-on-laptops.com/> and the
+         Battery Powered Linux mini-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>.
+
+         Note that, even if you say N here, Linux on the x86 architecture
+         will issue the hlt instruction if nothing is to be done, thereby
+         sending the processor to sleep and saving power.
+
+config ACPI
+       bool
+       depends on !IA64_HP_SIM
+       default y
 
-if PM
+if !IA64_HP_SIM
 
-source "arch/ia64/kernel/cpufreq/Kconfig"
+source "drivers/acpi/Kconfig"
 
 endif
 
@@ -448,8 +438,15 @@ menu "Bus options (PCI, PCMCIA)"
 config PCI
        bool "PCI support"
        help
-         Real IA-64 machines all have PCI/PCI-X/PCI Express busses.  Say Y
-         here unless you are using a simulator without PCI support.
+         Find out whether you have a PCI motherboard. PCI is the name of a
+         bus system, i.e. the way the CPU talks to the other stuff inside
+         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
+         VESA. If you have PCI, say Y, otherwise N.
+
+         The PCI-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>, contains valuable
+         information about which PCI hardware does work under Linux and which
+         doesn't.
 
 config PCI_DOMAINS
        bool
@@ -465,8 +462,6 @@ endmenu
 
 endif
 
-source "net/Kconfig"
-
 source "drivers/Kconfig"
 
 source "fs/Kconfig"
@@ -484,28 +479,10 @@ config GENERIC_IRQ_PROBE
        bool
        default y
 
-config GENERIC_PENDING_IRQ
-       bool
-       depends on GENERIC_HARDIRQS && SMP
-       default y
-
 source "arch/ia64/hp/sim/Kconfig"
 
-menu "Instrumentation Support"
-        depends on EXPERIMENTAL
-
 source "arch/ia64/oprofile/Kconfig"
 
-config KPROBES
-       bool "Kprobes (EXPERIMENTAL)"
-       help
-         Kprobes allows you to trap at almost any kernel address and
-         execute a callback function.  register_kprobe() establishes
-         a probepoint and specifies the callback.  Kprobes is useful
-         for kernel debugging, non-intrusive instrumentation and testing.
-         If in doubt, say "N".
-endmenu
-
 source "arch/ia64/Kconfig.debug"
 
 source "security/Kconfig"
index 1c597c27e328869747330bc11aa546fdc69b5418..d1f780fc9e960d595e1383d5a98adf3d84033ff2 100644 (file)
@@ -11,6 +11,9 @@
 NM := $(CROSS_COMPILE)nm -B
 READELF := $(CROSS_COMPILE)readelf
 
+# following is temporary pending xen directory restructuring
+NOSTDINC_FLAGS += -Iinclude/asm-xen
+
 export AWK
 
 CHECKFLAGS     += -m64 -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
@@ -88,7 +91,42 @@ unwcheck: vmlinux
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
-CLEAN_FILES += vmlinux.gz bootloader
+CLEAN_FILES += include/asm-ia64/.offsets.h.stamp vmlinux.gz bootloader
+#CLEAN_FILES += include/asm-xen/xen-public include/asm-ia64/xen/asm-xsi-offsets.h
+#CLEAN_FILES += include/asm-xen/linux-public include/asm-xen/asm-ia64/hypervisor.h
+
+MRPROPER_FILES += include/asm-ia64/offsets.h
+
+prepare: include/asm-ia64/offsets.h
+
+arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
+
+include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
+       $(call filechk,gen-asm-offsets)
+
+arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
+
+#XEN_PATH ?= $(srctree)/../xen-ia64-unstable.hg/
+include/asm-ia64/.offsets.h.stamp:
+       mkdir -p include/asm-ia64
+       [ -s include/asm-ia64/offsets.h ] \
+        || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/offsets.h
+       touch $@
+       [ -e include/asm-xen/asm ] \
+        || ln -s asm-ia64 include/asm-xen/asm
+#      [ -e include/asm-xen/xen-public ] \
+#       || ln -s $(XEN_PATH)/xen/include/public \
+#              include/asm-xen/xen-public
+#      [ -e include/asm-ia64/xen/asm-xsi-offsets.h ] \
+#       || ln -s $(XEN_PATH)/xen/include/asm-ia64/asm-xsi-offsets.h \
+#              include/asm-ia64/xen/asm-xsi-offsets.h
+#      [ -e include/asm-xen/linux-public ] \
+#       || ln -s $(XEN_PATH)/linux-2.6-xen-sparse/include/asm-xen/linux-public \
+               include/asm-xen/linux-public
+       [ -e include/asm-xen/asm-ia64/hypervisor.h ] \
+        || ln -s $(XEN_PATH)/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h \
+               include/asm-xen/asm-ia64/hypervisor.h
+
 
 boot:  lib/lib.a vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
index bd1f340774c4b14b5f89cadac04333338f9f76c8..c77200dcc0570a13405553939e7b1baed9ec9ddb 100644 (file)
@@ -37,7 +37,7 @@
 #include <asm/cache.h>
 #include <asm/errno.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/percpu.h>
 #include <asm/processor.h>
@@ -204,6 +204,9 @@ GLOBAL_ENTRY(__ia64_switch_to)
 (p6)   br.cond.dpnt .map
        ;;
 .done:
+(p6)   ssm psr.ic                      // if we had to map, reenable the psr.ic bit FIRST!!!
+       ;;
+(p6)   srlz.d
        ld8 sp=[r21]                    // load kernel stack pointer of new task
        mov IA64_KR(CURRENT)=in0        // update "current" application register
        mov r8=r13                      // return pointer to previously running task
@@ -231,9 +234,6 @@ GLOBAL_ENTRY(__ia64_switch_to)
        mov IA64_KR(CURRENT_STACK)=r26  // remember last page we mapped...
        ;;
        itr.d dtr[r25]=r23              // wire in new mapping...
-       ssm psr.ic                      // reenable the psr.ic bit
-       ;;
-       srlz.d
        br.cond.sptk .done
 END(__ia64_switch_to)
 
@@ -470,28 +470,17 @@ GLOBAL_ENTRY(load_switch_stack)
        br.cond.sptk.many b7
 END(load_switch_stack)
 
-GLOBAL_ENTRY(prefetch_stack)
-       add r14 = -IA64_SWITCH_STACK_SIZE, sp
-       add r15 = IA64_TASK_THREAD_KSP_OFFSET, in0
-       ;;
-       ld8 r16 = [r15]                         // load next's stack pointer
-       lfetch.fault.excl [r14], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
+GLOBAL_ENTRY(__ia64_syscall)
+       .regstk 6,0,0,0
+       mov r15=in5                             // put syscall number in place
+       break __BREAK_SYSCALL
+       movl r2=errno
+       cmp.eq p6,p7=-1,r10
        ;;
-       lfetch.fault [r16], 128
+(p6)   st4 [r2]=r8
+(p6)   mov r8=-1
        br.ret.sptk.many rp
-END(prefetch_stack)
+END(__ia64_syscall)
 
 GLOBAL_ENTRY(execve)
        mov r15=__NR_execve                     // put syscall number in place
@@ -651,7 +640,7 @@ END(ia64_ret_from_syscall)
  *           r8-r11: restored (syscall return value(s))
  *              r12: restored (user-level stack pointer)
  *              r13: restored (user-level thread pointer)
- *              r14: set to __kernel_syscall_via_epc
+ *              r14: cleared
  *              r15: restored (syscall #)
  *          r16-r17: cleared
  *              r18: user-level b6
@@ -672,7 +661,7 @@ END(ia64_ret_from_syscall)
  *               pr: restored (user-level pr)
  *               b0: restored (user-level rp)
  *               b6: restored
- *               b7: set to __kernel_syscall_via_epc
+ *               b7: cleared
  *          ar.unat: restored (user-level ar.unat)
  *           ar.pfs: restored (user-level ar.pfs)
  *           ar.rsc: restored (user-level ar.rsc)
@@ -718,79 +707,72 @@ GLOBAL_ENTRY(__ia64_leave_syscall)
        ;;
 (p6)   ld4 r31=[r18]                           // load current_thread_info()->flags
        ld8 r19=[r2],PT(B6)-PT(LOADRS)          // load ar.rsc value for "loadrs"
-       nop.i 0
+       mov b7=r0               // clear b7
        ;;
-       mov r16=ar.bsp                          // M2  get existing backing store pointer
+       ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)    // load ar.bspstore (may be garbage)
        ld8 r18=[r2],PT(R9)-PT(B6)              // load b6
 (p6)   and r15=TIF_WORK_MASK,r31               // any work other than TIF_SYSCALL_TRACE?
        ;;
-       ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)    // load ar.bspstore (may be garbage)
+       mov r16=ar.bsp                          // M2  get existing backing store pointer
 (p6)   cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
 (p6)   br.cond.spnt .work_pending_syscall
        ;;
        // start restoring the state saved on the kernel stack (struct pt_regs):
        ld8 r9=[r2],PT(CR_IPSR)-PT(R9)
        ld8 r11=[r3],PT(CR_IIP)-PT(R11)
-(pNonSys) break 0              //      bug check: we shouldn't be here if pNonSys is TRUE!
+       mov f6=f0               // clear f6
        ;;
        invala                  // M0|1 invalidate ALAT
-       rsm psr.i | psr.ic      // M2   turn off interrupts and interruption collection
-       cmp.eq p9,p0=r0,r0      // A    set p9 to indicate that we should restore cr.ifs
+       rsm psr.i | psr.ic      // M2 initiate turning off of interrupt and interruption collection
+       mov f9=f0               // clear f9
 
-       ld8 r29=[r2],16         // M0|1 load cr.ipsr
-       ld8 r28=[r3],16         // M0|1 load cr.iip
-       mov r22=r0              // A    clear r22
+       ld8 r29=[r2],16         // load cr.ipsr
+       ld8 r28=[r3],16                 // load cr.iip
+       mov f8=f0               // clear f8
        ;;
        ld8 r30=[r2],16         // M0|1 load cr.ifs
        ld8 r25=[r3],16         // M0|1 load ar.unat
-(pUStk) add r14=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
+       cmp.eq p9,p0=r0,r0      // set p9 to indicate that we should restore cr.ifs
        ;;
        ld8 r26=[r2],PT(B0)-PT(AR_PFS)  // M0|1 load ar.pfs
-(pKStk)        mov r22=psr                     // M2   read PSR now that interrupts are disabled
-       nop 0
+(pKStk)        mov r22=psr             // M2 read PSR now that interrupts are disabled
+       mov f10=f0              // clear f10
        ;;
-       ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // M0|1 load b0
-       ld8 r27=[r3],PT(PR)-PT(AR_RSC)  // M0|1 load ar.rsc
-       mov f6=f0                       // F    clear f6
+       ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // load b0
+       ld8 r27=[r3],PT(PR)-PT(AR_RSC)  // load ar.rsc
+       mov f11=f0              // clear f11
        ;;
-       ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT)    // M0|1 load ar.rnat (may be garbage)
-       ld8 r31=[r3],PT(R1)-PT(PR)              // M0|1 load predicates
-       mov f7=f0                               // F    clear f7
+       ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT)    // load ar.rnat (may be garbage)
+       ld8 r31=[r3],PT(R1)-PT(PR)              // load predicates
+(pUStk) add r14=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
        ;;
-       ld8 r20=[r2],PT(R12)-PT(AR_FPSR)        // M0|1 load ar.fpsr
-       ld8.fill r1=[r3],16                     // M0|1 load r1
-(pUStk) mov r17=1                              // A
+       ld8 r20=[r2],PT(R12)-PT(AR_FPSR)        // load ar.fpsr
+       ld8.fill r1=[r3],16     // load r1
+(pUStk) mov r17=1
        ;;
-(pUStk) st1 [r14]=r17                          // M2|3
-       ld8.fill r13=[r3],16                    // M0|1
-       mov f8=f0                               // F    clear f8
+       srlz.d                  // M0  ensure interruption collection is off
+       ld8.fill r13=[r3],16
+       mov f7=f0               // clear f7
        ;;
-       ld8.fill r12=[r2]                       // M0|1 restore r12 (sp)
-       ld8.fill r15=[r3]                       // M0|1 restore r15
-       mov b6=r18                              // I0   restore b6
+       ld8.fill r12=[r2]       // restore r12 (sp)
+       mov.m ar.ssd=r0         // M2 clear ar.ssd
+       mov r22=r0              // clear r22
 
-       addl r17=THIS_CPU(ia64_phys_stacked_size_p8),r0 // A
-       mov f9=f0                                       // F    clear f9
-(pKStk) br.cond.dpnt.many skip_rbs_switch              // B
-
-       srlz.d                          // M0   ensure interruption collection is off (for cover)
-       shr.u r18=r19,16                // I0|1 get byte size of existing "dirty" partition
-       cover                           // B    add current frame into dirty partition & set cr.ifs
+       ld8.fill r15=[r3]       // restore r15
+(pUStk) st1 [r14]=r17
+       addl r3=THIS_CPU(ia64_phys_stacked_size_p8),r0
        ;;
-(pUStk) ld4 r17=[r17]                  // M0|1 r17 = cpu_data->phys_stacked_size_p8
-       mov r19=ar.bsp                  // M2   get new backing store pointer
-       mov f10=f0                      // F    clear f10
-
-       nop.m 0
-       movl r14=__kernel_syscall_via_epc // X
+(pUStk)        ld4 r17=[r3]            // r17 = cpu_data->phys_stacked_size_p8
+       mov.m ar.csd=r0         // M2 clear ar.csd
+       mov b6=r18              // I0  restore b6
        ;;
-       mov.m ar.csd=r0                 // M2   clear ar.csd
-       mov.m ar.ccv=r0                 // M2   clear ar.ccv
-       mov b7=r14                      // I0   clear b7 (hint with __kernel_syscall_via_epc)
+       mov r14=r0              // clear r14
+       shr.u r18=r19,16        // I0|1 get byte size of existing "dirty" partition
+(pKStk) br.cond.dpnt.many skip_rbs_switch
 
-       mov.m ar.ssd=r0                 // M2   clear ar.ssd
-       mov f11=f0                      // F    clear f11
-       br.cond.sptk.many rbs_switch    // B
+       mov.m ar.ccv=r0         // clear ar.ccv
+(pNonSys) br.cond.dpnt.many dont_preserve_current_frame
+       br.cond.sptk.many rbs_switch
 END(__ia64_leave_syscall)
 
 #ifdef CONFIG_IA32_SUPPORT
@@ -909,7 +891,7 @@ GLOBAL_ENTRY(__ia64_leave_kernel)
        ldf.fill f7=[r2],PT(F11)-PT(F7)
        ldf.fill f8=[r3],32
        ;;
-       srlz.d  // ensure that inter. collection is off (VHPT is don't care, since text is pinned)
+       srlz.i                  // ensure interruption collection is off
        mov ar.ccv=r15
        ;;
        ldf.fill f11=[r2]
@@ -969,10 +951,11 @@ GLOBAL_ENTRY(__ia64_leave_kernel)
         * NOTE: alloc, loadrs, and cover can't be predicated.
         */
 (pNonSys) br.cond.dpnt dont_preserve_current_frame
+
+rbs_switch:
        cover                           // add current frame into dirty partition and set cr.ifs
        ;;
        mov r19=ar.bsp                  // get new backing store pointer
-rbs_switch:
        sub r16=r16,r18                 // krbs = old bsp - size of dirty partition
        cmp.ne p9,p0=r0,r0              // clear p9 to skip restore of cr.ifs
        ;;
@@ -1047,14 +1030,14 @@ rse_clear_invalid:
        mov loc5=0
        mov loc6=0
        mov loc7=0
-(pRecurse) br.call.dptk.few b0=rse_clear_invalid
+(pRecurse) br.call.sptk.few b0=rse_clear_invalid
        ;;
        mov loc8=0
        mov loc9=0
        cmp.ne pReturn,p0=r0,in1        // if recursion count != 0, we need to do a br.ret
        mov loc10=0
        mov loc11=0
-(pReturn) br.ret.dptk.many b0
+(pReturn) br.ret.sptk.many b0
 #endif /* !CONFIG_ITANIUM */
 #      undef pRecurse
 #      undef pReturn
@@ -1278,7 +1261,7 @@ ENTRY(sys_rt_sigreturn)
        stf.spill [r17]=f11
        adds out0=16,sp                         // out0 = &sigscratch
        br.call.sptk.many rp=ia64_rt_sigreturn
-.ret19:        .restore sp,0
+.ret19:        .restore sp 0
        adds sp=16,sp
        ;;
        ld8 r9=[sp]                             // load new ar.unat
@@ -1600,11 +1583,11 @@ sys_call_table:
        data8 sys_add_key
        data8 sys_request_key
        data8 sys_keyctl
-       data8 sys_ioprio_set
-       data8 sys_ioprio_get                    // 1275
        data8 sys_ni_syscall
-       data8 sys_inotify_init
-       data8 sys_inotify_add_watch
-       data8 sys_inotify_rm_watch
+       data8 sys_ni_syscall                    // 1275
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
 
        .org sys_call_table + 8*NR_syscalls     // guard against failures to increase NR_syscalls
index 78d2b5036174c129938dceafe3dd142647a5e88b..222a68d1cf01bdbe961e5decf93c3606ea0ee118 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/fpu.h>
 #include <asm/kregs.h>
 #include <asm/mmu_context.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pal.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
index 177809c79bf1c46fc22a37e67407b6577efa207e..3fcff8996ae719a54440108e286e958affc2b473 100644 (file)
@@ -20,7 +20,6 @@
  * 02/01/00 R.Seth     fixed get_cpuinfo for SMP
  * 01/07/99 S.Eranian  added the support for command line argument
  * 06/24/99 W.Drummond added boot_cpu_data.
- * 05/28/05 Z. Menyhart        Dynamic stride size for "flush_icache_range()"
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -41,8 +40,6 @@
 #include <linux/serial_core.h>
 #include <linux/efi.h>
 #include <linux/initrd.h>
-#include <linux/platform.h>
-#include <linux/pm.h>
 
 #include <asm/ia32.h>
 #include <asm/machvec.h>
@@ -75,43 +72,14 @@ DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
 unsigned long ia64_cycles_per_usec;
 struct ia64_boot_param *ia64_boot_param;
 struct screen_info screen_info;
-unsigned long vga_console_iobase;
-unsigned long vga_console_membase;
-
-static struct resource data_resource = {
-       .name   = "Kernel data",
-       .flags  = IORESOURCE_BUSY | IORESOURCE_MEM
-};
-
-static struct resource code_resource = {
-       .name   = "Kernel code",
-       .flags  = IORESOURCE_BUSY | IORESOURCE_MEM
-};
-extern void efi_initialize_iomem_resources(struct resource *,
-               struct resource *);
-extern char _text[], _end[], _etext[];
 
 unsigned long ia64_max_cacheline_size;
-
-int dma_get_cache_alignment(void)
-{
-        return ia64_max_cacheline_size;
-}
-EXPORT_SYMBOL(dma_get_cache_alignment);
-
 unsigned long ia64_iobase;     /* virtual address for I/O accesses */
 EXPORT_SYMBOL(ia64_iobase);
 struct io_space io_space[MAX_IO_SPACES];
 EXPORT_SYMBOL(io_space);
 unsigned int num_io_spaces;
 
-/*
- * "flush_icache_range()" needs to know what processor dependent stride size to use
- * when it makes i-cache(s) coherent with d-caches.
- */
-#define        I_CACHE_STRIDE_SHIFT    5       /* Safest way to go: 32 bytes by 32 bytes */
-unsigned long ia64_i_cache_stride_shift = ~0;
-
 /*
  * The merge_mask variable needs to be set to (max(iommu_page_size(iommu)) - 1).  This
  * mask specifies a mask of address bits that must be 0 in order for two buffers to be
@@ -191,22 +159,6 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
        }
 }
 
-/*
- * Request address space for all standard resources
- */
-static int __init register_memory(void)
-{
-       code_resource.start = ia64_tpa(_text);
-       code_resource.end   = ia64_tpa(_etext) - 1;
-       data_resource.start = ia64_tpa(_etext);
-       data_resource.end   = ia64_tpa(_end) - 1;
-       efi_initialize_iomem_resources(&code_resource, &data_resource);
-
-       return 0;
-}
-
-__initcall(register_memory);
-
 /**
  * reserve_memory - setup reserved memory areas
  *
@@ -247,9 +199,6 @@ reserve_memory (void)
        }
 #endif
 
-       efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end);
-       n++;
-
        /* end of memory marker */
        rsvd_region[n].start = ~0UL;
        rsvd_region[n].end   = ~0UL;
@@ -283,31 +232,28 @@ find_initrd (void)
 static void __init
 io_port_init (void)
 {
+       extern unsigned long ia64_iobase;
        unsigned long phys_iobase;
 
        /*
-        * Set `iobase' based on the EFI memory map or, failing that, the
-        * value firmware left in ar.k0.
-        *
-        * Note that in ia32 mode, IN/OUT instructions use ar.k0 to compute
-        * the port's virtual address, so ia32_load_state() loads it with a
-        * user virtual address.  But in ia64 mode, glibc uses the
-        * *physical* address in ar.k0 to mmap the appropriate area from
-        * /dev/mem, and the inX()/outX() interfaces use MMIO.  In both
-        * cases, user-mode can only use the legacy 0-64K I/O port space.
+        *  Set `iobase' to the appropriate address in region 6 (uncached access range).
         *
-        * ar.k0 is not involved in kernel I/O port accesses, which can use
-        * any of the I/O port spaces and are done via MMIO using the
-        * virtual mmio_base from the appropriate io_space[].
+        *  The EFI memory map is the "preferred" location to get the I/O port space base,
+        *  rather the relying on AR.KR0. This should become more clear in future SAL
+        *  specs. We'll fall back to getting it out of AR.KR0 if no appropriate entry is
+        *  found in the memory map.
         */
        phys_iobase = efi_get_iobase();
-       if (!phys_iobase) {
+       if (phys_iobase)
+               /* set AR.KR0 since this is all we use it for anyway */
+               ia64_set_kr(IA64_KR_IO_BASE, phys_iobase);
+       else {
                phys_iobase = ia64_get_kr(IA64_KR_IO_BASE);
-               printk(KERN_INFO "No I/O port range found in EFI memory map, "
-                       "falling back to AR.KR0 (0x%lx)\n", phys_iobase);
+               printk(KERN_INFO "No I/O port range found in EFI memory map, falling back "
+                      "to AR.KR0\n");
+               printk(KERN_INFO "I/O port base = 0x%lx\n", phys_iobase);
        }
        ia64_iobase = (unsigned long) ioremap(phys_iobase, 0);
-       ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
 
        /* setup legacy IO port space */
        io_space[0].mmio_base = ia64_iobase;
@@ -327,29 +273,26 @@ io_port_init (void)
 static inline int __init
 early_console_setup (char *cmdline)
 {
-       int earlycons = 0;
-
 #ifdef CONFIG_XEN
-       if (!early_xen_console_setup(cmdline))
-               earlycons++;
+       if (!early_xen_console_setup(cmdline)) return 0;
 #endif
 #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
        {
                extern int sn_serial_console_early_setup(void);
                if (!sn_serial_console_early_setup())
-                       earlycons++;
+                       return 0;
        }
 #endif
 #ifdef CONFIG_EFI_PCDP
        if (!efi_setup_pcdp_console(cmdline))
-               earlycons++;
+               return 0;
 #endif
 #ifdef CONFIG_SERIAL_8250_CONSOLE
        if (!early_serial_console_init(cmdline))
-               earlycons++;
+               return 0;
 #endif
 
-       return (earlycons) ? 0 : -1;
+       return -1;
 }
 
 static inline void
@@ -430,7 +373,7 @@ setup_arch (char **cmdline_p)
        if (early_console_setup(*cmdline_p) == 0)
                mark_bsp_online();
 
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BOOT
        /* Initialize the ACPI boot-time table parser */
        acpi_table_init();
 # ifdef CONFIG_ACPI_NUMA
@@ -465,9 +408,8 @@ setup_arch (char **cmdline_p)
 #endif
 
        cpu_init();     /* initialize the bootstrap CPU */
-       mmu_context_init();     /* initialize context_id bitmap */
 
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BOOT
        acpi_boot_init();
 #endif
 
@@ -573,7 +515,7 @@ show_cpuinfo (struct seq_file *m, void *v)
                   c->itc_freq / 1000000, c->itc_freq % 1000000,
                   lpj*HZ/500000, (lpj*HZ/5000) % 100);
 #ifdef CONFIG_SMP
-       seq_printf(m, "siblings   : %u\n", cpus_weight(cpu_core_map[cpunum]));
+       seq_printf(m, "siblings   : %u\n", c->num_log);
        if (c->threads_per_core > 1 || c->cores_per_socket > 1)
                seq_printf(m,
                           "physical id: %u\n"
@@ -683,12 +625,6 @@ setup_per_cpu_areas (void)
        /* start_kernel() requires this... */
 }
 
-/*
- * Calculate the max. cache line size.
- *
- * In addition, the minimum of the i-cache stride sizes is calculated for
- * "flush_icache_range()".
- */
 static void
 get_max_cacheline_size (void)
 {
@@ -702,8 +638,6 @@ get_max_cacheline_size (void)
                 printk(KERN_ERR "%s: ia64_pal_cache_summary() failed (status=%ld)\n",
                        __FUNCTION__, status);
                 max = SMP_CACHE_BYTES;
-               /* Safest setup for "flush_icache_range()" */
-               ia64_i_cache_stride_shift = I_CACHE_STRIDE_SHIFT;
                goto out;
         }
 
@@ -712,31 +646,14 @@ get_max_cacheline_size (void)
                                                    &cci);
                if (status != 0) {
                        printk(KERN_ERR
-                              "%s: ia64_pal_cache_config_info(l=%lu, 2) failed (status=%ld)\n",
+                              "%s: ia64_pal_cache_config_info(l=%lu) failed (status=%ld)\n",
                               __FUNCTION__, l, status);
                        max = SMP_CACHE_BYTES;
-                       /* The safest setup for "flush_icache_range()" */
-                       cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
-                       cci.pcci_unified = 1;
                }
                line_size = 1 << cci.pcci_line_size;
                if (line_size > max)
                        max = line_size;
-               if (!cci.pcci_unified) {
-                       status = ia64_pal_cache_config_info(l,
-                                                   /* cache_type (instruction)= */ 1,
-                                                   &cci);
-                       if (status != 0) {
-                               printk(KERN_ERR
-                               "%s: ia64_pal_cache_config_info(l=%lu, 1) failed (status=%ld)\n",
-                                       __FUNCTION__, l, status);
-                               /* The safest setup for "flush_icache_range()" */
-                               cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
-                       }
-               }
-               if (cci.pcci_stride < ia64_i_cache_stride_shift)
-                       ia64_i_cache_stride_shift = cci.pcci_stride;
-       }
+        }
   out:
        if (max > ia64_max_cacheline_size)
                ia64_max_cacheline_size = max;
@@ -865,7 +782,6 @@ cpu_init (void)
        /* size of physical stacked register partition plus 8 bytes: */
        __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8;
        platform_cpu_init();
-       pm_idle = default_idle;
 }
 
 void
index 05226b3cfaf27651e23e73d895edb44687fe7d9a..6e63488616c907c032d8510c9375b8d8ef63db3e 100755 (executable)
@@ -13,10 +13,10 @@ then
        mv net net.xen-x86
        mv kernel kernel.xen-x86
        mv drivers/acpi/tables.c drivers/acpi/tables.c.xen-x86
-#      mv arch/xen/kernel drivers/xen/core
-#      mv arch/xen arch/xen.xen-x86
-#      mkdir arch/xen
-#      mv arch/xen.xen-x86/configs arch/xen
+       mv arch/xen/kernel drivers/xen/core
+       mv arch/xen arch/xen.xen-x86
+       mkdir arch/xen
+       mv arch/xen.xen-x86/configs arch/xen
 #      mv include/asm-generic include/asm-generic.xen-x86
        mv include/linux include/linux.xen-x86
        mkdir include/linux
index 0dde4200950cf0c058ebfe4c5163f56add779cf1..90a76639103a1b4625bd7717df4b5b94e13f69ad 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <asm/hw_irq.h>
-#include <xen/evtchn.h>
+#include <asm-xen/evtchn.h>
 
 #define MAX_EVTCHN 1024
 
index 0d1ded964a98bb5e27e8d34b70439854b69b8f48..8d701f3284ba09b616d59ce63152ffe34942b70b 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/errno.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/percpu.h>
 #include <asm/processor.h>
index d53b52ab37a6e0e0be518911c7d49b3b7d48b35b..021050f441162aa6477ef7986f1dafeb03a1e45b 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/break.h>
 #include <asm/ia32.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
index 7d36bf4d4e190ca2c894e5769d39cd8fc5821549..d148b0029cb50caf8311b462868e6ae1bd63b0ba 100644 (file)
@@ -69,11 +69,33 @@ config ARCH_MAY_HAVE_PC_FDC
        bool
        default y
 
+config DMI
+       bool
+       default y
+
 source "init/Kconfig"
 
 
 menu "Processor type and features"
 
+choice
+       prompt "Subarchitecture Type"
+       default X86_PC
+
+config X86_PC
+       bool "PC-compatible"
+       help
+         Choose this option if your computer is a standard PC or compatible.
+
+config X86_VSMP
+       bool "Support for ScaleMP vSMP"
+        help
+         Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
+         supposed to run on these EM64T-based machines.  Only choose this option
+         if you have one of these machines.
+
+endchoice
+
 choice
        prompt "Processor family"
        default MK8
@@ -100,7 +122,6 @@ endchoice
 config X86_64_XEN
        bool "Enable Xen compatible kernel"
        select SWIOTLB if XEN_PHYSDEV_ACCESS
-       select DUMMY_IOMMU if XEN_PHYSDEV_ACCESS
        help
          This option will compile a kernel compatible with Xen hypervisor
 
@@ -299,7 +320,11 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config ARCH_SPARSEMEM_ENABLE
        def_bool y
-       depends on NUMA
+       depends on (NUMA || EXPERIMENTAL)
+
+config ARCH_MEMORY_PROBE
+       def_bool y
+       depends on MEMORY_HOTPLUG
 
 config ARCH_FLATMEM_ENABLE
        def_bool y
@@ -309,6 +334,7 @@ source "mm/Kconfig"
 
 config HAVE_ARCH_EARLY_PFN_TO_NID
        def_bool y
+       depends on NUMA
 
 config NR_CPUS
        int "Maximum number of CPUs (2-256)"
@@ -346,7 +372,7 @@ config HPET_TIMER
          <http://www.intel.com/hardwaredesign/hpetspec.htm>.
 
 config X86_PM_TIMER
-       bool "PM timer"
+       bool "PM timer" if EMBEDDED
        depends on ACPI && !X86_64_XEN
        default y
        help
@@ -365,32 +391,24 @@ config HPET_EMULATE_RTC
        depends on HPET_TIMER && RTC=y
 
 config GART_IOMMU
-       bool "IOMMU support"
+       bool "K8 GART IOMMU support"
        default y
+       select SWIOTLB
        depends on PCI && !X86_64_XEN
        help
          Support the IOMMU. Needed to run systems with more than 3GB of memory
          properly with 32-bit PCI devices that do not support DAC (Double Address
          Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter.
          Normally the kernel will take the right choice by itself.
-         This option includes a driver for the AMD Opteron/Athlon64 IOMMU
-         and a software emulation used on some other systems.
+         This option includes a driver for the AMD Opteron/Athlon64 northbridge IOMMU
+         and a software emulation used on other systems.
          If unsure, say Y.
 
 # need this always enabled with GART_IOMMU for the VIA workaround
 config SWIOTLB
-       bool
-       depends on GART_IOMMU
-       default y
-
-config DUMMY_IOMMU
        bool
-       depends on !GART_IOMMU && !SWIOTLB
        default y
-       help
-         Don't use IOMMU code. This will cause problems when you have more than 4GB
-         of memory and any 32-bit devices. Don't turn on unless you know what you
-         are doing.
+       depends on GART_IOMMU
 
 config X86_MCE
        bool "Machine check support" if EMBEDDED
@@ -418,17 +436,6 @@ config X86_MCE_AMD
           Additional support for AMD specific MCE features such as
           the DRAM Error Threshold.
 
-config PHYSICAL_START
-       hex "Physical address where the kernel is loaded" if EMBEDDED
-       default "0x100000"
-       help
-         This gives the physical address where the kernel is loaded.
-         Primarily used in the case of kexec on panic where the
-         fail safe kernel needs to run at a different address than
-         the panic-ed kernel.
-
-         Don't change this unless you know what you are doing.
-
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
        depends on EXPERIMENTAL && !X86_64_XEN
@@ -446,6 +453,31 @@ config KEXEC
          support.  As of this writing the exact hardware interface is
          strongly in flux, so no good recommendation can be made.
 
+config CRASH_DUMP
+       bool "kernel crash dumps (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+               Generate crash dump after being started by kexec.
+
+config PHYSICAL_START
+       hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
+       default "0x1000000" if CRASH_DUMP
+       default "0x100000"
+       help
+         This gives the physical address where the kernel is loaded. Normally
+         for regular kernels this value is 0x100000 (1MB). But in the case
+         of kexec on panic the fail safe kernel needs to run at a different
+         address than the panic-ed kernel. This option is used to set the load
+         address for kernels used to capture crash dump on being kexec'ed
+         after panic. The default value for crash dump kernels is
+         0x1000000 (16MB). This can also be set based on the "X" value as
+         specified in the "crashkernel=YM@XM" command line boot parameter
+         passed to the panic-ed kernel. Typically this parameter is set as
+         crashkernel=64M@16M. Please take a look at
+         Documentation/kdump/kdump.txt for more details about crash dumps.
+
+         Don't change this unless you know what you are doing.
+
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
        depends on PROC_FS
@@ -568,11 +600,6 @@ config SYSVIPC_COMPAT
        depends on COMPAT && SYSVIPC
        default y
 
-config UID16
-       bool
-       depends on IA32_EMULATION
-       default y
-
 endmenu
 
 source "net/Kconfig"
index 957df36382af6718e6509246928b74a60ea1ac2b..51c54df7cf7bb48414ea7b92489d432011b83d31 100644 (file)
@@ -31,6 +31,7 @@ cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
 cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
 CFLAGS += $(cflags-y)
 
+CFLAGS += -m64
 CFLAGS += -mno-red-zone
 CFLAGS += -mcmodel=kernel
 CFLAGS += -pipe
@@ -38,8 +39,10 @@ CFLAGS += -pipe
 # actually it makes the kernel smaller too.
 CFLAGS += -fno-reorder-blocks  
 CFLAGS += -Wno-sign-compare
-ifneq ($(CONFIG_DEBUG_INFO),y)
+ifneq ($(CONFIG_UNWIND_INFO),y)
 CFLAGS += -fno-asynchronous-unwind-tables
+endif
+ifneq ($(CONFIG_DEBUG_INFO),y)
 # -fweb shrinks the kernel a bit, but the difference is very small
 # it also messes up debugging, so don't use it for now.
 #CFLAGS += $(call cc-option,-fweb)
@@ -50,6 +53,8 @@ CFLAGS += $(call cc-option,-funit-at-a-time)
 # prevent gcc from generating any FP code by mistake
 CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
 
+AFLAGS += -m64
+
 head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o
 
 libs-y                                         += arch/x86_64/lib/
@@ -95,8 +100,11 @@ bzlilo: vmlinux
 bzdisk: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
 
-install fdimage fdimage144 fdimage288: vmlinux
+fdimage fdimage144 fdimage288: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
+
+install:
+       $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 
 endif
 
 archclean:
index 9ac02836407b00783d02cce2a151fdb7c5cb6c0f..0045b23f7ec95c615b4968449b3d540f92f65477 100644 (file)
@@ -2,9 +2,9 @@
 # Makefile for the ia32 kernel emulation subsystem.
 #
 
-obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
-       ia32_signal.o tls32.o \
-       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o
+obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o tls32.o \
+       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o \
+       mmap32.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
 obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
@@ -30,7 +30,6 @@ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
 
 AFLAGS_vsyscall-sysenter.o = -m32 -Iarch/i386/kernel
 AFLAGS_vsyscall-syscall.o = -m32 -Iarch/i386/kernel
-CFLAGS_ia32_ioctl.o += -Ifs/
 
 ifdef CONFIG_XEN
 AFLAGS_vsyscall-int80.o = -m32 -Iarch/i386/kernel
index e483f80dd88d9b9ef4b679a4418c1cdb2c0097ad..0954e35d031a6dc8f0c5bbd2e51b502438a268ef 100644 (file)
 #define __sti          sti     
 #endif                 
 
+       .macro CFI_STARTPROC32 simple
+       CFI_STARTPROC   \simple
+       CFI_UNDEFINED   r8
+       CFI_UNDEFINED   r9
+       CFI_UNDEFINED   r10
+       CFI_UNDEFINED   r11
+       CFI_UNDEFINED   r12
+       CFI_UNDEFINED   r13
+       CFI_UNDEFINED   r14
+       CFI_UNDEFINED   r15
+       .endm
+
 /*
  * 32bit SYSENTER instruction entry.
  *
@@ -72,7 +84,7 @@
  * with the int 0x80 path.
  */    
 ENTRY(ia32_sysenter_target)
-       CFI_STARTPROC   simple
+       CFI_STARTPROC32 simple
        CFI_DEF_CFA     rsp,0
        CFI_REGISTER    rsp,rbp
        __swapgs 
@@ -110,6 +122,7 @@ ENTRY(ia32_sysenter_target)
        .quad 1b,ia32_badarg
        .previous       
        GET_THREAD_INFO(%r10)
+       orl    $TS_COMPAT,threadinfo_status(%r10)
        testl  $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        CFI_REMEMBER_STATE
        jnz  sysenter_tracesys
@@ -124,6 +137,7 @@ sysenter_do_call:
        __cli
        testl   $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
        jnz     int_ret_from_sys_call
+       andl    $~TS_COMPAT,threadinfo_status(%r10)
        /* clear IF, that popfq doesn't enable interrupts early */
        andl  $~0x200,EFLAGS-R11(%rsp) 
        RESTORE_ARGS 1,24,1,1,1,1
@@ -181,7 +195,7 @@ sysenter_tracesys:
  * with the int 0x80 path.     
  */    
 ENTRY(ia32_cstar_target)
-       CFI_STARTPROC   simple
+       CFI_STARTPROC32 simple
        CFI_DEF_CFA     rsp,0
        CFI_REGISTER    rip,rcx
        /*CFI_REGISTER  rflags,r11*/
@@ -212,6 +226,7 @@ ENTRY(ia32_cstar_target)
        .quad 1b,ia32_badarg
        .previous       
        GET_THREAD_INFO(%r10)
+       orl   $TS_COMPAT,threadinfo_status(%r10)
        testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        CFI_REMEMBER_STATE
        jnz   cstar_tracesys
@@ -226,6 +241,7 @@ cstar_do_call:
        __cli
        testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
        jnz  int_ret_from_sys_call
+       andl $~TS_COMPAT,threadinfo_status(%r10)
        RESTORE_ARGS 1,-ARG_SKIP,1,1,1
        movl RIP-ARGOFFSET(%rsp),%ecx
        CFI_REGISTER rip,rcx
@@ -303,6 +319,7 @@ ENTRY(ia32_syscall)
           this could be a problem. */
        SAVE_ARGS 0,0,1
        GET_THREAD_INFO(%r10)
+       orl   $TS_COMPAT,threadinfo_status(%r10)
        testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        jnz ia32_tracesys
 ia32_do_syscall:       
@@ -345,7 +362,7 @@ quiet_ni_syscall:
        jmp  ia32_ptregs_common 
        .endm
 
-       CFI_STARTPROC
+       CFI_STARTPROC32
 
        PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
        PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
@@ -360,15 +377,26 @@ quiet_ni_syscall:
 
 ENTRY(ia32_ptregs_common)
        popq %r11
-       CFI_ADJUST_CFA_OFFSET -8
-       CFI_REGISTER rip, r11
+       CFI_ENDPROC
+       CFI_STARTPROC32 simple
+       CFI_DEF_CFA     rsp,SS+8-ARGOFFSET
+       CFI_REL_OFFSET  rax,RAX-ARGOFFSET
+       CFI_REL_OFFSET  rcx,RCX-ARGOFFSET
+       CFI_REL_OFFSET  rdx,RDX-ARGOFFSET
+       CFI_REL_OFFSET  rsi,RSI-ARGOFFSET
+       CFI_REL_OFFSET  rdi,RDI-ARGOFFSET
+       CFI_REL_OFFSET  rip,RIP-ARGOFFSET
+/*     CFI_REL_OFFSET  cs,CS-ARGOFFSET*/
+/*     CFI_REL_OFFSET  rflags,EFLAGS-ARGOFFSET*/
+       CFI_REL_OFFSET  rsp,RSP-ARGOFFSET
+/*     CFI_REL_OFFSET  ss,SS-ARGOFFSET*/
        SAVE_REST
        call *%rax
        RESTORE_REST
        jmp  ia32_sysret        /* misbalances the return cache */
        CFI_ENDPROC
 
-       .data
+       .section .rodata,"a"
        .align 8
        .globl ia32_sys_call_table
 ia32_sys_call_table:
@@ -635,7 +663,7 @@ ia32_sys_call_table:
        .quad sys_epoll_wait
        .quad sys_remap_file_pages
        .quad sys_set_tid_address
-       .quad sys32_timer_create
+       .quad compat_sys_timer_create
        .quad compat_sys_timer_settime  /* 260 */
        .quad compat_sys_timer_gettime
        .quad sys_timer_getoverrun
@@ -670,6 +698,20 @@ ia32_sys_call_table:
        .quad sys_inotify_init
        .quad sys_inotify_add_watch
        .quad sys_inotify_rm_watch
+       .quad sys_migrate_pages
+       .quad compat_sys_openat         /* 295 */
+       .quad sys_mkdirat
+       .quad sys_mknodat
+       .quad sys_fchownat
+       .quad sys_futimesat
+       .quad compat_sys_newfstatat     /* 300 */
+       .quad sys_unlinkat
+       .quad sys_renameat
+       .quad sys_linkat
+       .quad sys_symlinkat
+       .quad sys_readlinkat            /* 305 */
+       .quad sys_fchmodat
+       .quad sys_faccessat
 ia32_syscall_end:              
        .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
                .quad ni_syscall
index b11b01276e8d673d183274ae34e340784cfb399c..00e4148d90674f2736f1ff26314dd4e13aa8d26c 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/ia32_unistd.h>
 #include <asm/asm-offsets.h>
 
+       .code32
        .text
        .section .text.vsyscall,"ax"
        .globl __kernel_vsyscall
index ced62df0241a61749da23b8670856a8cb3699529..3947f45d08582601fd08f3a864c440bc593929eb 100644 (file)
@@ -7,6 +7,7 @@
  * by doing ".balign 32" must match in both versions of the page.
  */
 
+       .code32
        .section .text.sigreturn,"ax"
        .balign 32
        .globl __kernel_sigreturn
index 804568d747058fc01db86da5e1f5149fb0cf9792..4804676e0932e5984fb3106f5aebda33163a0fdd 100644 (file)
@@ -7,7 +7,8 @@ EXTRA_AFLAGS    := -traditional
 obj-y  := process.o signal.o entry.o traps.o irq.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
                x8664_ksyms.o i387.o syscall.o vsyscall.o \
-               setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o
+               setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
+               dmi_scan.o pci-dma.o pci-nommu.o
 
 obj-$(CONFIG_X86_MCE)         += mce.o
 obj-$(CONFIG_X86_MCE_INTEL)    += mce_intel.o
@@ -23,15 +24,17 @@ obj-$(CONFIG_X86_XEN_GENAPIC)       += genapic.o genapic_xen.o
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o mpparse.o \
                genapic.o genapic_cluster.o genapic_flat.o
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
 obj-$(CONFIG_ACPI_SLEEP)       += suspend.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o
 obj-$(CONFIG_CPU_FREQ)         += cpufreq/
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 obj-$(CONFIG_GART_IOMMU)       += pci-gart.o aperture.o
-obj-$(CONFIG_DUMMY_IOMMU)      += pci-nommu.o pci-dma.o
+obj-$(CONFIG_SWIOTLB)          += pci-swiotlb.o
 obj-$(CONFIG_KPROBES)          += kprobes.o
 obj-$(CONFIG_X86_PM_TIMER)     += pmtimer.o
+obj-$(CONFIG_X86_VSMP)         += vsmp.o
 
 obj-$(CONFIG_MODULES)          += module.o
 
@@ -48,6 +51,7 @@ intel_cacheinfo-y             += ../../i386/kernel/cpu/intel_cacheinfo.o
 quirks-y                       += ../../i386/kernel/quirks.o
 i8237-y                                += ../../i386/kernel/i8237.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
+dmi_scan-y                     += ../../i386/kernel/dmi_scan.o
 
 ifdef CONFIG_XEN
 time-y                         += ../../i386/kernel/time-xen.o
@@ -55,7 +59,7 @@ pci-dma-y                     += ../../i386/kernel/pci-dma-xen.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  := ../../i386/kernel/microcode-xen.o
 quirks-y                       := ../../i386/kernel/quirks-xen.o
 
-n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o
+n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o pci-swiotlb.o
 
 include $(srctree)/scripts/Makefile.xen
 
index 12cebc3020292c1c752c18ea1277157d0fc2874e..d82b568b4ff09d899cf235c6c5939b39790a2fd4 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
+#include <linux/module.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -33,6 +34,7 @@
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
 #include <asm/hpet.h>
+#include <asm/idle.h>
 
 /*
  * Debug level
@@ -42,35 +44,12 @@ int disable_apic;
 
 void smp_local_timer_interrupt(struct pt_regs *regs)
 {
-
        profile_tick(CPU_PROFILING, regs);
 #ifndef CONFIG_XEN
-       int cpu = smp_processor_id();
-
-       if (--per_cpu(prof_counter, cpu) <= 0) {
-               /*
-                * The multiplier may have changed since the last time we got
-                * to this point as a result of the user writing to
-                * /proc/profile. In this case we need to adjust the APIC
-                * timer accordingly.
-                *
-                * Interrupts are already masked off at this point.
-                */
-               per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
-               if (per_cpu(prof_counter, cpu) != 
-                   per_cpu(prof_old_multiplier, cpu)) {
-                       __setup_APIC_LVTT(calibration_result/
-                                       per_cpu(prof_counter, cpu));
-                       per_cpu(prof_old_multiplier, cpu) =
-                               per_cpu(prof_counter, cpu);
-               }
-
 #ifdef CONFIG_SMP
                update_process_times(user_mode(regs));
 #endif
-       }
 #endif
-
        /*
         * We take the 'long' return path, and there every subsystem
         * grabs the appropriate locks (kernel lock/ irq lock).
@@ -108,6 +87,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs)
         * Besides, if we don't timer interrupts ignore the global
         * interrupt lock, which is the WrongThing (tm) to do.
         */
+       exit_idle();
        irq_enter();
        smp_local_timer_interrupt(regs);
        irq_exit();
@@ -119,6 +99,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs)
 asmlinkage void smp_spurious_interrupt(void)
 {
        unsigned int v;
+       exit_idle();
        irq_enter();
        /*
         * Check if this really is a spurious interrupt and ACK it
@@ -154,6 +135,7 @@ asmlinkage void smp_error_interrupt(void)
 {
        unsigned int v, v1;
 
+       exit_idle();
        irq_enter();
        /* First tickle the hardware, only then report what went on. -- REW */
        v = apic_read(APIC_ESR);
@@ -182,6 +164,13 @@ int get_physical_broadcast(void)
         return 0xff;
 }
 
+#ifdef CONFIG_XEN
+void switch_APIC_timer_to_ipi(void *cpumask) { }
+EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
+void switch_ipi_to_APIC_timer(void *cpumask) { }
+EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
+#endif
+
 /*
  * This initializes the IO-APIC and APIC hardware if this is
  * a UP kernel.
index a66b628b68978a433c6ca0903eace86fb8a82294..ac5ae87095573c73386ab34620176b024794735d 100644 (file)
@@ -276,6 +276,7 @@ void __init e820_reserve_resources(void)
                }
        }
 }
+#endif /* CONFIG_XEN */
 
 void __init e820_print_map(char *who)
 {
@@ -303,6 +304,7 @@ void __init e820_print_map(char *who)
        }
 }
 
+#ifndef CONFIG_XEN
 /*
  * Sanitize the BIOS e820 map.
  *
@@ -660,6 +662,27 @@ void __init parse_memopt(char *p, char **from)
        xen_override_max_pfn = (unsigned long) end_user_pfn;
 } 
 
+void __init parse_memmapopt(char *p, char **from)
+{
+       unsigned long long start_at, mem_size;
+
+       mem_size = memparse(p, from);
+       p = *from;
+       if (*p == '@') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_RAM);
+       } else if (*p == '#') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_ACPI);
+       } else if (*p == '$') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_RESERVED);
+       } else {
+               end_user_pfn = (mem_size >> PAGE_SHIFT);
+       }
+       p = *from;
+}
+
 /*
  * Search for the biggest gap in the low 32 bits of the e820
  * memory space.  We pass this space to PCI to assign MMIO resources
index e764cdfad3c8f2011b634f01c287c73bf141ca81..c1eb6b5392757c380e85b1480545dc7d76c90a05 100644 (file)
@@ -251,7 +251,7 @@ void early_printk(const char *fmt, ...)
        va_end(ap); 
 } 
 
-static int keep_early; 
+static int __initdata keep_early;
 
 int __init setup_early_printk(char *opt) 
 {  
@@ -261,8 +261,6 @@ int __init setup_early_printk(char *opt)
        if (early_console_initialized)
                return -1;
 
-       opt = strchr(opt, '=') + 1;
-
        strlcpy(buf,opt,sizeof(buf)); 
        space = strchr(buf, ' '); 
        if (space)
index e1030282b5248d526107ccb36ba32a54beeaddaf..5c3f6e988f4e8dabc74b05d494776c54f32dc5c7 100644 (file)
@@ -48,6 +48,7 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/hw_irq.h>
+#include <asm/page.h>
 #include <asm/errno.h>
 #include <xen/interface/arch-x86_64.h>
 
@@ -334,6 +335,7 @@ int_with_check:
        movl threadinfo_flags(%rcx),%edx
        andl %edi,%edx
        jnz   int_careful
+       andl    $~TS_COMPAT,threadinfo_status(%rcx)
        jmp   retint_restore_args
 
        /* Either reschedule or signal or syscall exit tracking needed. */
@@ -679,27 +681,40 @@ ENTRY(spurious_interrupt)
        CFI_ENDPROC
        .endm
 
-#if 0
+#if 0 /* not XEN */
        /* error code is on the stack already */
        /* handle NMI like exceptions that can happen everywhere */
-       .macro paranoidentry sym
+       .macro paranoidentry sym, ist=0
         movq (%rsp),%rcx
         movq 8(%rsp),%r11
         addq $0x10,%rsp /* skip rcx and r11 */        
        SAVE_ALL
        cld
+#if 0 /* not XEN */
        movl $1,%ebx
        movl  $MSR_GS_BASE,%ecx
        rdmsr
        testl %edx,%edx
        js    1f
-/*     swapgs */
+       swapgs
        xorl  %ebx,%ebx
-1:     movq %rsp,%rdi
+1:
+#endif
+       .if \ist
+       movq    %gs:pda_data_offset, %rbp
+       .endif
+       movq %rsp,%rdi
        movq ORIG_RAX(%rsp),%rsi
        movq $-1,ORIG_RAX(%rsp)
+       .if \ist
+       subq    $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
+       .endif
        call \sym
-       cli
+       .if \ist
+       addq    $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp)
+       .endif
+/*     cli */
+       XEN_BLOCK_EVENTS(%rsi)          
        .endm
 #endif
        
@@ -1057,7 +1072,12 @@ paranoid_schedule:
 #endif        
 
 KPROBE_ENTRY(int3)
-       zeroentry do_int3       
+       INTR_FRAME
+/*     pushq $0
+       CFI_ADJUST_CFA_OFFSET 8 */
+       zeroentry do_int3
+/*     jmp paranoid_exit */
+       CFI_ENDPROC
        .previous .text
 
 ENTRY(overflow)
@@ -1120,24 +1140,18 @@ ENTRY(machine_check)
        CFI_ENDPROC
 #endif
 
-ENTRY(call_debug)
-       zeroentry do_call_debug
-
-
 ENTRY(call_softirq)
        CFI_STARTPROC
        movq %gs:pda_irqstackptr,%rax
-       pushq %r15
-       CFI_ADJUST_CFA_OFFSET 8
-       movq %rsp,%r15
-       CFI_DEF_CFA_REGISTER    r15
+       movq %rsp,%rdx
+       CFI_DEF_CFA_REGISTER    rdx
        incl %gs:pda_irqcount
        cmove %rax,%rsp
+       pushq %rdx
+       /*todo CFI_DEF_CFA_EXPRESSION ...*/
        call __do_softirq
-       movq %r15,%rsp
+       popq %rsp
        CFI_DEF_CFA_REGISTER    rsp
        decl %gs:pda_irqcount
-       popq %r15
-       CFI_ADJUST_CFA_OFFSET -8
        ret
        CFI_ENDPROC
index 0055064587cf8f6881b3a9a2e178082e00cb4f2e..1b1ddd257dac2846262e2f0003d4c6ac7500896b 100644 (file)
@@ -22,7 +22,6 @@
        .ascii  ",HYPERCALL_PAGE=0x10d" /* __pa(hypercall_page) >> 12 */
        .ascii  ",LOADER=generic"
        .byte   0
-                
       
 #include <linux/threads.h>
 #include <linux/init.h>
@@ -93,14 +92,15 @@ ENTRY(lgdt_finish)
 ENTRY(stext)
 ENTRY(_stext)
 
-       /*
-        * This default setting generates an ident mapping at address 0x100000
-        * and a mapping for the kernel that precisely maps virtual address
-        * 0xffffffff80000000 to physical address 0x000000. (always using
-        * 2Mbyte large pages provided by PAE mode)
-        */
-.org 0x1000
-ENTRY(init_level4_pgt)
+       $page = 0
+#define NEXT_PAGE(name) \
+       $page = $page + 1; \
+       .org $page * 0x1000; \
+       phys_/**/name = $page * 0x1000 + __PHYSICAL_START; \
+ENTRY(name)
+
+NEXT_PAGE(init_level4_pgt)
+       /* This gets initialized in x86_64_start_kernel */
        .fill   512,8,0
 
         /*
@@ -110,73 +110,39 @@ ENTRY(init_level4_pgt)
          * We also use this page to establish the initiali mapping for
          * vsyscall area.
          */
-.org 0x2000
-ENTRY(init_level4_user_pgt)
+NEXT_PAGE(init_level4_user_pgt)
        .fill   512,8,0
 
        /*
         * In Xen the following pre-initialized pgt entries are re-initialized.
         */
-.org 0x3000
-ENTRY(level3_kernel_pgt)
+NEXT_PAGE(level3_kernel_pgt)
        .fill   510,8,0
        /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
-       .quad   0x0000000000005007 + __PHYSICAL_START   /* -> level2_kernel_pgt */
+       .quad   phys_level2_kernel_pgt | 0x007
        .fill   1,8,0
 
-.org 0x4000
-ENTRY(level2_ident_pgt)
+NEXT_PAGE(level2_ident_pgt)
        /* 40MB for bootup.     */
-       .quad   0x0000000000000083
-       .quad   0x0000000000200083
-       .quad   0x0000000000400083
-       .quad   0x0000000000600083
-       .quad   0x0000000000800083
-       .quad   0x0000000000A00083
-       .quad   0x0000000000C00083
-       .quad   0x0000000000E00083
-       .quad   0x0000000001000083
-       .quad   0x0000000001200083
-       .quad   0x0000000001400083
-       .quad   0x0000000001600083
-       .quad   0x0000000001800083
-       .quad   0x0000000001A00083
-       .quad   0x0000000001C00083
-       .quad   0x0000000001E00083
-       .quad   0x0000000002000083
-       .quad   0x0000000002200083
-       .quad   0x0000000002400083
-       .quad   0x0000000002600083
+       i = 0
+       .rept 20
+       .quad   i << 21 | 0x083
+       i = i + 1
+       .endr
        /* Temporary mappings for the super early allocator in arch/x86_64/mm/init.c */
        .globl temp_boot_pmds
 temp_boot_pmds:
        .fill   492,8,0
 
-.org 0x5000
-ENTRY(level2_kernel_pgt)
+NEXT_PAGE(level2_kernel_pgt)
        /* 40MB kernel mapping. The kernel code cannot be bigger than that.
           When you change this change KERNEL_TEXT_SIZE in page.h too. */
        /* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */
-       .quad   0x0000000000000183
-       .quad   0x0000000000200183
-       .quad   0x0000000000400183
-       .quad   0x0000000000600183
-       .quad   0x0000000000800183
-       .quad   0x0000000000A00183
-       .quad   0x0000000000C00183
-       .quad   0x0000000000E00183
-       .quad   0x0000000001000183
-       .quad   0x0000000001200183
-       .quad   0x0000000001400183
-       .quad   0x0000000001600183
-       .quad   0x0000000001800183
-       .quad   0x0000000001A00183
-       .quad   0x0000000001C00183
-       .quad   0x0000000001E00183
-       .quad   0x0000000002000183
-       .quad   0x0000000002200183
-       .quad   0x0000000002400183
-       .quad   0x0000000002600183
+       i = 0
+       .rept 20
+       .quad   i << 21 | 0x183
+       i = i + 1
+       .endr
        /* Module mapping starts here */
        .fill   492,8,0
        
@@ -184,19 +150,16 @@ ENTRY(level2_kernel_pgt)
          * This is used for vsyscall area mapping as we have a different
          * level4 page table for user.
          */
-.org 0x6000
-ENTRY(level3_user_pgt)
+NEXT_PAGE(level3_user_pgt)
         .fill  512,8,0
 
-.org 0x7000
-ENTRY(cpu_gdt_table)
+NEXT_PAGE(cpu_gdt_table)
 /* The TLS descriptors are currently at a different place compared to i386.
    Hopefully nobody expects them at a fixed place (Wine?) */
        .quad   0x0000000000000000      /* NULL descriptor */
-       .quad   0x008ffa000000ffff      /* __KERNEL_COMPAT32_CS */      
+       .quad   0x0                     /* unused */
        .quad   0x00affa000000ffff      /* __KERNEL_CS */
        .quad   0x00cff2000000ffff      /* __KERNEL_DS */
-       
                .quad   0x00cffa000000ffff      /* __USER32_CS */
        .quad   0x00cff2000000ffff      /* __USER_DS, __USER32_DS  */           
        .quad   0x00affa000000ffff      /* __USER_CS */
@@ -204,47 +167,45 @@ ENTRY(cpu_gdt_table)
        .quad   0,0                     /* TSS */
        .quad   0,0                     /* LDT */
        .quad   0,0,0                   /* three TLS descriptors */ 
-       .quad   0                       /* unused now?   __KERNEL16_CS - 16bit PM for S3 wakeup. */
-
+       .quad   0                       /* unused */
 gdt_end:
 #if 0
        /* asm/segment.h:GDT_ENTRIES must match this */ 
        /* This should be a multiple of the cache line size */
-       /* GDTs of other CPUs: */       
-       .fill (GDT_SIZE * NR_CPUS) - (gdt_end - cpu_gdt_table)
-#endif
+       /* GDTs of other CPUs are now dynamically allocated */
 
-.org 0x8000
-ENTRY(empty_zero_page)
+       /* zero the remaining page */
+       .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0
+#endif
 
-.org 0x9000
-ENTRY(empty_bad_page)
+NEXT_PAGE(empty_zero_page)
 
-.org 0xa000
-ENTRY(empty_bad_pte_table)
+NEXT_PAGE(level3_physmem_pgt)
+       .quad   phys_level2_kernel_pgt | 0x007  /* so that __va works even before pagetable_init */
 
-.org 0xb000
-ENTRY(empty_bad_pmd_table)
+NEXT_PAGE(hypercall_page)
+.if (phys_hypercall_page - 0x10a000)
+       /* cause compiler error if the hypercall_page is at a
+        * different address than expected. */
+       .quad   __adjust_hypercall_page_in_header
+.endif
 
-.org 0xc000
-ENTRY(level3_physmem_pgt)
-       .quad   0x0000000000005007 + __PHYSICAL_START   /* -> level2_kernel_pgt (so that __va works even before pagetable_init) */
+#undef NEXT_PAGE
 
-.org 0xd000
-ENTRY(hypercall_page)
+       .data
 
-.org 0xe000
+#ifndef CONFIG_XEN
 #ifdef CONFIG_ACPI_SLEEP
+       .align PAGE_SIZE
 ENTRY(wakeup_level4_pgt)
-       .quad   0x0000000000002007 + __PHYSICAL_START   /* -> level3_ident_pgt */
+       .quad   phys_level3_ident_pgt | 0x007
        .fill   255,8,0
-       .quad   0x000000000000a007 + __PHYSICAL_START
+       .quad   phys_level3_physmem_pgt | 0x007
        .fill   254,8,0
        /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
-       .quad   0x0000000000003007 + __PHYSICAL_START   /* -> level3_kernel_pgt */
+       .quad   phys_level3_kernel_pgt | 0x007
 #endif
 
-#ifndef CONFIG_XEN
 #ifndef CONFIG_HOTPLUG_CPU
        __INITDATA
 #endif
@@ -256,12 +217,12 @@ ENTRY(wakeup_level4_pgt)
         */
        .align PAGE_SIZE
 ENTRY(boot_level4_pgt)
-       .quad   0x0000000000002007 + __PHYSICAL_START   /* -> level3_ident_pgt */
+       .quad   phys_level3_ident_pgt | 0x007
        .fill   255,8,0
-       .quad   0x000000000000a007 + __PHYSICAL_START
+       .quad   phys_level3_physmem_pgt | 0x007
        .fill   254,8,0
        /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
-       .quad   0x0000000000003007 + __PHYSICAL_START   /* -> level3_kernel_pgt */
+       .quad   phys_level3_kernel_pgt | 0x007
 #endif
 
        .data
@@ -284,10 +245,8 @@ gdt:
  * Also sysret mandates a special GDT layout 
  */
                                
-#if 0                                  
-.align L1_CACHE_BYTES
-#endif
-       .align  L1_CACHE_BYTES
+.align PAGE_SIZE
+
 ENTRY(idt_table)       
        .rept   256
        .quad   0
index 03eca591090cd14ed0aa03c5f299eb53758db647..82f0e9d89993c38d6f788f5295d95ee06d3e9ede 100644 (file)
@@ -45,9 +45,9 @@ static void __init clear_bss(void)
 
 extern char saved_command_line[];
 
-#if 0
 static void __init copy_bootdata(char *real_mode_data)
 {
+#if 0
        int new_data;
        char * command_line;
 
@@ -63,9 +63,17 @@ static void __init copy_bootdata(char *real_mode_data)
        }
        command_line = (char *) ((u64)(new_data));
        memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
-       printk("Bootdata ok (command line is %s)\n", saved_command_line);       
-}
+       printk("Bootdata ok (command line is %s)\n", saved_command_line);
+#else
+       int max_cmdline;
+       
+       if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
+               max_cmdline = COMMAND_LINE_SIZE;
+       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
+       saved_command_line[max_cmdline-1] = '\0';
+       printk("Bootdata ok (command line is %s)\n", saved_command_line);
 #endif
+}
 
 static void __init setup_boot_cpu_data(void)
 {
@@ -87,6 +95,7 @@ static void __init setup_boot_cpu_data(void)
 
 void __init x86_64_start_kernel(char * real_mode_data)
 {
+       char *s;
        int i;
 
        if (!xen_feature(XENFEAT_auto_translated_physmap)) {
@@ -101,16 +110,18 @@ void __init x86_64_start_kernel(char * real_mode_data)
 #if 0
        asm volatile("lidt %0" :: "m" (idt_descr));
 #endif
+
+       for (i = 0; i < NR_CPUS; i++)
+               cpu_pda(i) = &boot_cpu_pda[i];
+
        pda_init(0);
-        /*     copy_bootdata(real_mode_data); */
+       copy_bootdata(real_mode_data);
 #ifdef CONFIG_SMP
        cpu_set(0, cpu_online_map);
 #endif
-#if 0
        s = strstr(saved_command_line, "earlyprintk=");
        if (s != NULL)
-               setup_early_printk(s);
-#endif
+               setup_early_printk(strchr(s, '=') + 1);
 #ifdef CONFIG_NUMA
        s = strstr(saved_command_line, "numa=");
        if (s != NULL)
index b165c70346b95860804b89167942f76803e0ae69..e78f83a0fb13648cbbda0160853e8cd59112f406 100644 (file)
@@ -37,6 +37,7 @@
 #include <asm/proto.h>
 #include <asm/mach_apic.h>
 #include <asm/acpi.h>
+#include <asm/dma.h>
 
 #define __apicdebuginit  __init
 
@@ -46,6 +47,11 @@ static int no_timer_check;
 
 int disable_timer_pin_1 __initdata;
 
+#ifndef CONFIG_XEN
+/* Where if anywhere is the i8259 connect in external int mode */
+static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
+#endif
+
 static DEFINE_SPINLOCK(ioapic_lock);
 
 /*
@@ -308,9 +314,6 @@ __setup("apic", enable_ioapic_setup);
 void __init check_ioapic(void) 
 { 
        int num,slot,func; 
-       if (ioapic_force) 
-               return; 
-
        /* Poor man's PCI discovery */
        for (num = 0; num < 32; num++) { 
                for (slot = 0; slot < 32; slot++) { 
@@ -332,7 +335,7 @@ void __init check_ioapic(void)
                                switch (vendor) { 
                                case PCI_VENDOR_ID_VIA:
 #ifdef CONFIG_GART_IOMMU
-                                       if ((end_pfn >= (0xffffffff>>PAGE_SHIFT) ||
+                                       if ((end_pfn > MAX_DMA32_PFN ||
                                             force_iommu) &&
                                            !iommu_aperture_allowed) {
                                                printk(KERN_INFO
@@ -412,7 +415,7 @@ static int find_irq_entry(int apic, int pin, int type)
 /*
  * Find the pin to which IRQ[irq] (ISA) is connected
  */
-static int find_isa_irq_pin(int irq, int type)
+static int __init find_isa_irq_pin(int irq, int type)
 {
        int i;
 
@@ -429,6 +432,31 @@ static int find_isa_irq_pin(int irq, int type)
        }
        return -1;
 }
+
+static int __init find_isa_irq_apic(int irq, int type)
+{
+       int i;
+
+       for (i = 0; i < mp_irq_entries; i++) {
+               int lbus = mp_irqs[i].mpc_srcbus;
+
+               if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA ||
+                    mp_bus_id_to_type[lbus] == MP_BUS_EISA ||
+                    mp_bus_id_to_type[lbus] == MP_BUS_MCA) &&
+                   (mp_irqs[i].mpc_irqtype == type) &&
+                   (mp_irqs[i].mpc_srcbusirq == irq))
+                       break;
+       }
+       if (i < mp_irq_entries) {
+               int apic;
+               for(apic = 0; apic < nr_ioapics; apic++) {
+                       if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic)
+                               return apic;
+               }
+       }
+
+       return -1;
+}
 #endif
 
 /*
@@ -926,7 +954,7 @@ static void __init setup_IO_APIC_irqs(void)
  * Set up the 8259A-master output pin as broadcast to all
  * CPUs.
  */
-static void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
+static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, int vector)
 {
        struct IO_APIC_route_entry entry;
        unsigned long flags;
@@ -936,7 +964,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
        disable_8259A_irq(0);
 
        /* mask LVT0 */
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
 
        /*
         * We use logical delivery to get the timer IRQ
@@ -960,8 +988,8 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
         * Add it to the IO-APIC irq-routing table:
         */
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
-       io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+       io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
+       io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        enable_8259A_irq(0);
@@ -1244,7 +1272,10 @@ void __init print_IO_APIC(void) { }
 static void __init enable_IO_APIC(void)
 {
        union IO_APIC_reg_01 reg_01;
-       int i;
+#ifndef CONFIG_XEN
+       int i8259_apic, i8259_pin;
+#endif
+       int i, apic;
        unsigned long flags;
 
        for (i = 0; i < PIN_MAP_SIZE; i++) {
@@ -1258,12 +1289,51 @@ static void __init enable_IO_APIC(void)
        /*
         * The number of IO-APIC IRQ registers (== #pins):
         */
-       for (i = 0; i < nr_ioapics; i++) {
+       for (apic = 0; apic < nr_ioapics; apic++) {
                spin_lock_irqsave(&ioapic_lock, flags);
-               reg_01.raw = io_apic_read(i, 1);
+               reg_01.raw = io_apic_read(apic, 1);
                spin_unlock_irqrestore(&ioapic_lock, flags);
-               nr_ioapic_registers[i] = reg_01.bits.entries+1;
+               nr_ioapic_registers[apic] = reg_01.bits.entries+1;
        }
+#ifndef CONFIG_XEN
+       for(apic = 0; apic < nr_ioapics; apic++) {
+               int pin;
+               /* See if any of the pins is in ExtINT mode */
+               for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
+                       struct IO_APIC_route_entry entry;
+                       spin_lock_irqsave(&ioapic_lock, flags);
+                       *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
+                       *(((int *)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
+                       spin_unlock_irqrestore(&ioapic_lock, flags);
+
+
+                       /* If the interrupt line is enabled and in ExtInt mode
+                        * I have found the pin where the i8259 is connected.
+                        */
+                       if ((entry.mask == 0) && (entry.delivery_mode == dest_ExtINT)) {
+                               ioapic_i8259.apic = apic;
+                               ioapic_i8259.pin  = pin;
+                               goto found_i8259;
+                       }
+               }
+       }
+ found_i8259:
+       /* Look to see what if the MP table has reported the ExtINT */
+       i8259_pin  = find_isa_irq_pin(0, mp_ExtINT);
+       i8259_apic = find_isa_irq_apic(0, mp_ExtINT);
+       /* Trust the MP table if nothing is setup in the hardware */
+       if ((ioapic_i8259.pin == -1) && (i8259_pin >= 0)) {
+               printk(KERN_WARNING "ExtINT not setup in hardware but reported by MP table\n");
+               ioapic_i8259.pin  = i8259_pin;
+               ioapic_i8259.apic = i8259_apic;
+       }
+       /* Complain if the MP table and the hardware disagree */
+       if (((ioapic_i8259.apic != i8259_apic) || (ioapic_i8259.pin != i8259_pin)) &&
+               (i8259_pin >= 0) && (ioapic_i8259.pin >= 0))
+       {
+               printk(KERN_WARNING "ExtINT in hardware and MP table differ\n");
+       }
+#endif
 
        /*
         * Do not trust the IO-APIC being empty at bootup
@@ -1276,9 +1346,6 @@ static void __init enable_IO_APIC(void)
  */
 void disable_IO_APIC(void)
 {
-#ifndef CONFIG_XEN
-       int pin;
-#endif
        /*
         * Clear the IO-APIC before rebooting:
         */
@@ -1290,8 +1357,7 @@ void disable_IO_APIC(void)
         * Put that IOAPIC in virtual wire mode
         * so legacy interrupts can be delivered.
         */
-       pin = find_isa_irq_pin(0, mp_ExtINT);
-       if (pin != -1) {
+       if (ioapic_i8259.pin != -1) {
                struct IO_APIC_route_entry entry;
                unsigned long flags;
 
@@ -1302,21 +1368,23 @@ void disable_IO_APIC(void)
                entry.polarity        = 0; /* High */
                entry.delivery_status = 0;
                entry.dest_mode       = 0; /* Physical */
-               entry.delivery_mode   = 7; /* ExtInt */
+               entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
-               entry.dest.physical.physical_dest = 0;
-
+               entry.dest.physical.physical_dest =
+                                       GET_APIC_ID(apic_read(APIC_ID));
 
                /*
                 * Add it to the IO-APIC irq-routing table:
                 */
                spin_lock_irqsave(&ioapic_lock, flags);
-               io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
-               io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+               io_apic_write(ioapic_i8259.apic, 0x11+2*ioapic_i8259.pin,
+                       *(((int *)&entry)+1));
+               io_apic_write(ioapic_i8259.apic, 0x10+2*ioapic_i8259.pin,
+                       *(((int *)&entry)+0));
                spin_unlock_irqrestore(&ioapic_lock, flags);
        }
 
-       disconnect_bsp_APIC(pin != -1);
+       disconnect_bsp_APIC(ioapic_i8259.pin != -1);
 #endif
 }
 
@@ -1640,7 +1708,7 @@ static void enable_lapic_irq (unsigned int irq)
        unsigned long v;
 
        v = apic_read(APIC_LVT0);
-       apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED);
+       apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED);
 }
 
 static void disable_lapic_irq (unsigned int irq)
@@ -1648,7 +1716,7 @@ static void disable_lapic_irq (unsigned int irq)
        unsigned long v;
 
        v = apic_read(APIC_LVT0);
-       apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED);
+       apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
 }
 
 static void ack_lapic_irq (unsigned int irq)
@@ -1695,20 +1763,21 @@ static void setup_nmi (void)
  */
 static inline void unlock_ExtINT_logic(void)
 {
-       int pin, i;
+       int apic, pin, i;
        struct IO_APIC_route_entry entry0, entry1;
        unsigned char save_control, save_freq_select;
        unsigned long flags;
 
-       pin = find_isa_irq_pin(8, mp_INT);
+       pin  = find_isa_irq_pin(8, mp_INT);
+       apic = find_isa_irq_apic(8, mp_INT);
        if (pin == -1)
                return;
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       *(((int *)&entry0) + 1) = io_apic_read(0, 0x11 + 2 * pin);
-       *(((int *)&entry0) + 0) = io_apic_read(0, 0x10 + 2 * pin);
+       *(((int *)&entry0) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
+       *(((int *)&entry0) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
        spin_unlock_irqrestore(&ioapic_lock, flags);
-       clear_IO_APIC_pin(0, pin);
+       clear_IO_APIC_pin(apic, pin);
 
        memset(&entry1, 0, sizeof(entry1));
 
@@ -1721,8 +1790,8 @@ static inline void unlock_ExtINT_logic(void)
        entry1.vector = 0;
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
-       io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
+       io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
+       io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        save_control = CMOS_READ(RTC_CONTROL);
@@ -1740,11 +1809,11 @@ static inline void unlock_ExtINT_logic(void)
 
        CMOS_WRITE(save_control, RTC_CONTROL);
        CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
-       clear_IO_APIC_pin(0, pin);
+       clear_IO_APIC_pin(apic, pin);
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
-       io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
+       io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
+       io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
@@ -1756,7 +1825,7 @@ static inline void unlock_ExtINT_logic(void)
  */
 static inline void check_timer(void)
 {
-       int pin1, pin2;
+       int apic1, pin1, apic2, pin2;
        int vector;
 
        /*
@@ -1773,14 +1842,17 @@ static inline void check_timer(void)
         * the 8259A which implies the virtual wire has to be
         * disabled in the local APIC.
         */
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
        init_8259A(1);
        enable_8259A_irq(0);
 
-       pin1 = find_isa_irq_pin(0, mp_INT);
-       pin2 = find_isa_irq_pin(0, mp_ExtINT);
+       pin1  = find_isa_irq_pin(0, mp_INT);
+       apic1 = find_isa_irq_apic(0, mp_INT);
+       pin2  = ioapic_i8259.pin;
+       apic2 = ioapic_i8259.apic;
 
-       apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X pin1=%d pin2=%d\n", vector, pin1, pin2);
+       apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
+               vector, apic1, pin1, apic2, pin2);
 
        if (pin1 != -1) {
                /*
@@ -1798,17 +1870,20 @@ static inline void check_timer(void)
                                clear_IO_APIC_pin(0, pin1);
                        return;
                }
-               clear_IO_APIC_pin(0, pin1);
-               apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n");
+               clear_IO_APIC_pin(apic1, pin1);
+               apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not "
+                               "connected to IO-APIC\n");
        }
 
-       apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... ");
+       apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) "
+                               "through the 8259A ... ");
        if (pin2 != -1) {
-               apic_printk(APIC_VERBOSE,"\n..... (found pin %d) ...", pin2);
+               apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...",
+                       apic2, pin2);
                /*
                 * legacy devices should be connected to IO APIC #0
                 */
-               setup_ExtINT_IRQ0_pin(pin2, vector);
+               setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
                if (timer_irq_works()) {
                        printk("works.\n");
                        nmi_watchdog_default();
@@ -1820,7 +1895,7 @@ static inline void check_timer(void)
                /*
                 * Cleanup, just in case ...
                 */
-               clear_IO_APIC_pin(0, pin2);
+               clear_IO_APIC_pin(apic2, pin2);
        }
        printk(" failed.\n");
 
@@ -1833,21 +1908,21 @@ static inline void check_timer(void)
 
        disable_8259A_irq(0);
        irq_desc[0].handler = &lapic_irq_type;
-       apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector);   /* Fixed mode */
+       apic_write(APIC_LVT0, APIC_DM_FIXED | vector);  /* Fixed mode */
        enable_8259A_irq(0);
 
        if (timer_irq_works()) {
                apic_printk(APIC_QUIET, " works.\n");
                return;
        }
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
        apic_printk(APIC_VERBOSE," failed.\n");
 
        apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as ExtINT IRQ...");
 
        init_8259A(0);
        make_8259A_irq(0);
-       apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_DM_EXTINT);
 
        unlock_ExtINT_logic();
 
index a14c8b3afd9709214d612df1a7aa52458676f95f..1b628dff54c06a28a4ef4efcf3c8f7c634577b8a 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
index 9fdd74ec7ecd9962688fcf0f4e0d56ac970c409b..331e7ef4dbfa2b2c4392413d7315e5feac8fc20e 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/delay.h>
 #include <asm/uaccess.h>
 #include <asm/io_apic.h>
+#include <asm/idle.h>
 
 atomic_t irq_err_count;
 #ifdef CONFIG_X86_IO_APIC
@@ -69,13 +70,13 @@ skip:
                seq_printf(p, "NMI: ");
                for (j = 0; j < NR_CPUS; j++)
                        if (cpu_online(j))
-                               seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
+                               seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count);
                seq_putc(p, '\n');
 #ifdef CONFIG_X86_LOCAL_APIC
                seq_printf(p, "LOC: ");
                for (j = 0; j < NR_CPUS; j++)
                        if (cpu_online(j))
-                               seq_printf(p, "%10u ", cpu_pda[j].apic_timer_irqs);
+                               seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs);
                seq_putc(p, '\n');
 #endif
                seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
@@ -98,6 +99,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
        /* high bits used in ret_from_ code  */
         int irq = regs->orig_rax & __IRQ_MASK(HARDIRQ_BITS);
 
+       exit_idle();
        irq_enter();
 
        __do_IRQ(irq, regs);
index 6b7972e3f1b0eaa7c6f6857f513fde76b5dff960..e415649751950d142c6c72c4ba9e2a4bc73a06d7 100644 (file)
@@ -6,93 +6,94 @@
 #include <linux/string.h>
 #include <asm/proto.h>
 #include <asm/processor.h>
+#include <asm/dma.h>
 
-int iommu_merge = 0;
-EXPORT_SYMBOL(iommu_merge);
-
-dma_addr_t bad_dma_address;
-EXPORT_SYMBOL(bad_dma_address);
-
-int iommu_bio_merge = 0;
-EXPORT_SYMBOL(iommu_bio_merge);
-
-int iommu_sac_force = 0;
-EXPORT_SYMBOL(iommu_sac_force);
-
-#if 0
-/* 
- * Dummy IO MMU functions
- */
-
-void *dma_alloc_coherent(struct device *hwdev, size_t size,
-                        dma_addr_t *dma_handle, gfp_t gfp)
+static int
+check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
 {
-       void *ret;
-       u64 mask;
-       int order = get_order(size);
-
-       if (hwdev)
-               mask = hwdev->coherent_dma_mask & *hwdev->dma_mask;
-       else
-               mask = 0xffffffff;
-       for (;;) {
-               ret = (void *)__get_free_pages(gfp, order);
-               if (ret == NULL)
-                       return NULL;
-               *dma_handle = virt_to_bus(ret);
-               if ((*dma_handle & ~mask) == 0)
-                       break;
-               free_pages((unsigned long)ret, order);
-               if (gfp & GFP_DMA)
-                       return NULL;
-               gfp |= GFP_DMA;
+        if (hwdev && bus + size > *hwdev->dma_mask) {
+               printk(KERN_ERR
+                   "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
+              name, (long long)bus, size, (long long)*hwdev->dma_mask);
+               return 0;
        }
+       return 1;
+}
 
-       memset(ret, 0, size);
-       return ret;
+static dma_addr_t
+nommu_map_single(struct device *hwdev, void *ptr, size_t size,
+              int direction)
+{
+       dma_addr_t bus = virt_to_bus(ptr);
+       if (!check_addr("map_single", hwdev, bus, size))
+                               return bad_dma_address;
+       return bus;
 }
-EXPORT_SYMBOL(dma_alloc_coherent);
 
-void dma_free_coherent(struct device *hwdev, size_t size,
-                        void *vaddr, dma_addr_t dma_handle)
+void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
+                       int direction)
 {
-       free_pages((unsigned long)vaddr, get_order(size));
 }
-EXPORT_SYMBOL(dma_free_coherent);
-#endif
 
-#if 0
-int dma_supported(struct device *hwdev, u64 mask)
+/* Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scatter-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
+              int nents, int direction)
 {
-        /*
-         * we fall back to GFP_DMA when the mask isn't all 1s,
-         * so we can't guarantee allocations that must be
-         * within a tighter range than GFP_DMA..
-        * RED-PEN this won't work for pci_map_single. Caller has to
-        * use GFP_DMA in the first place.
-         */
-        if (mask < 0x00ffffff)
-                return 0;
+       int i;
 
-       return 1;
-} 
-EXPORT_SYMBOL(dma_supported);
-#endif
+       BUG_ON(direction == DMA_NONE);
+       for (i = 0; i < nents; i++ ) {
+               struct scatterlist *s = &sg[i];
+               BUG_ON(!s->page);
+               s->dma_address = virt_to_bus(page_address(s->page) +s->offset);
+               if (!check_addr("map_sg", hwdev, s->dma_address, s->length))
+                       return 0;
+               s->dma_length = s->length;
+       }
+       return nents;
+}
 
-int dma_get_cache_alignment(void)
+/* Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
+ */
+void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
+                 int nents, int dir)
 {
-       return boot_cpu_data.x86_clflush_size;
 }
-EXPORT_SYMBOL(dma_get_cache_alignment);
 
-static int __init check_ram(void) 
-{ 
-       if (end_pfn >= 0xffffffff>>PAGE_SHIFT) { 
-               printk(
-               KERN_ERR "WARNING more than 4GB of memory but IOMMU not compiled in.\n"
-               KERN_ERR "WARNING 32bit PCI may malfunction.\n");
-       } 
-       return 0;
-} 
-__initcall(check_ram);
+struct dma_mapping_ops nommu_dma_ops = {
+       .map_single = nommu_map_single,
+       .unmap_single = nommu_unmap_single,
+       .map_sg = nommu_map_sg,
+       .unmap_sg = nommu_unmap_sg,
+       .is_phys = 1,
+};
 
+void __init no_iommu_init(void)
+{
+       if (dma_ops)
+               return;
+       printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n");
+       dma_ops = &nommu_dma_ops;
+       if (end_pfn > MAX_DMA32_PFN) {
+               printk(KERN_ERR
+                      "WARNING more than 4GB of memory but IOMMU not compiled in.\n"
+                      KERN_ERR "WARNING 32bit PCI may malfunction.\n"
+                      KERN_ERR "You might want to enable CONFIG_GART_IOMMU\n");
+       }
+}
index 3c75dd9e75c5e80bfd0dc951677500f575409c96..15671852d22c52f4f0a65b463b27a60f03c3612c 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/utsname.h>
 #include <linux/random.h>
 #include <linux/kprobes.h>
+#include <linux/notifier.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/proto.h>
 #include <asm/hardirq.h>
 #include <asm/ia32.h>
+#include <asm/idle.h>
 
 asmlinkage extern void ret_from_fork(void);
 
 unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
 
-static atomic_t hlt_counter = ATOMIC_INIT(0);
-
 unsigned long boot_option_idle_override = 0;
 EXPORT_SYMBOL(boot_option_idle_override);
 
@@ -72,19 +72,49 @@ EXPORT_SYMBOL(boot_option_idle_override);
 void (*pm_idle)(void);
 static DEFINE_PER_CPU(unsigned int, cpu_idle_state);
 
-void disable_hlt(void)
+static struct notifier_block *idle_notifier;
+static DEFINE_SPINLOCK(idle_notifier_lock);
+
+void idle_notifier_register(struct notifier_block *n)
+{
+       unsigned long flags;
+       spin_lock_irqsave(&idle_notifier_lock, flags);
+       notifier_chain_register(&idle_notifier, n);
+       spin_unlock_irqrestore(&idle_notifier_lock, flags);
+}
+EXPORT_SYMBOL_GPL(idle_notifier_register);
+
+void idle_notifier_unregister(struct notifier_block *n)
 {
-       atomic_inc(&hlt_counter);
+       unsigned long flags;
+       spin_lock_irqsave(&idle_notifier_lock, flags);
+       notifier_chain_unregister(&idle_notifier, n);
+       spin_unlock_irqrestore(&idle_notifier_lock, flags);
 }
+EXPORT_SYMBOL(idle_notifier_unregister);
 
-EXPORT_SYMBOL(disable_hlt);
+enum idle_state { CPU_IDLE, CPU_NOT_IDLE };
+static DEFINE_PER_CPU(enum idle_state, idle_state) = CPU_NOT_IDLE;
 
-void enable_hlt(void)
+void enter_idle(void)
 {
-       atomic_dec(&hlt_counter);
+       __get_cpu_var(idle_state) = CPU_IDLE;
+       notifier_call_chain(&idle_notifier, IDLE_START, NULL);
 }
 
-EXPORT_SYMBOL(enable_hlt);
+static void __exit_idle(void)
+{
+       __get_cpu_var(idle_state) = CPU_NOT_IDLE;
+       notifier_call_chain(&idle_notifier, IDLE_END, NULL);
+}
+
+/* Called from interrupts to signify idle end */
+void exit_idle(void)
+{
+       if (current->pid | read_pda(irqcount))
+               return;
+       __exit_idle();
+}
 
 /* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
 extern void stop_hz_timer(void);
@@ -110,7 +140,7 @@ void xen_idle(void)
 DECLARE_PER_CPU(int, cpu_state);
 
 #include <asm/nmi.h>
-/* We don't actually take CPU down, just spin without interrupts. */
+/* We halt the CPU with physical CPU hotplug */
 static inline void play_dead(void)
 {
        idle_task_exit();
@@ -157,8 +187,9 @@ void cpu_idle (void)
                        
                        if (cpu_is_offline(smp_processor_id()))
                                play_dead();
-
+                       enter_idle();
                        xen_idle();
+                       __exit_idle();
                }
 
                preempt_enable_no_resched();
@@ -364,7 +395,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
        struct task_struct *me = current;
 
        childregs = ((struct pt_regs *)
-                       (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+                       (THREAD_SIZE + task_stack_page(p))) - 1;
        *childregs = *regs;
 
        childregs->rax = 0;
@@ -376,7 +407,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
        p->thread.rsp0 = (unsigned long) (childregs+1);
        p->thread.userrsp = me->thread.userrsp; 
 
-       set_ti_thread_flag(p->thread_info, TIF_FORK);
+       set_tsk_thread_flag(p, TIF_FORK);
 
        p->thread.fs = me->thread.fs;
        p->thread.gs = me->thread.gs;
@@ -534,7 +565,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
        write_pda(oldrsp, next->userrsp); 
        write_pda(pcurrent, next_p); 
        write_pda(kernelstack,
-           (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET);
+                 task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET);
 
        /*
         * Now maybe reload the debug registers
@@ -628,7 +659,7 @@ unsigned long get_wchan(struct task_struct *p)
 
        if (!p || p == current || p->state==TASK_RUNNING)
                return 0; 
-       stack = (unsigned long)p->thread_info; 
+       stack = (unsigned long)task_stack_page(p);
        if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE)
                return 0;
        fp = *(u64 *)(p->thread.rsp);
@@ -748,8 +779,7 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
 {
        struct pt_regs *pp, ptregs;
 
-       pp = (struct pt_regs *)(tsk->thread.rsp0);
-       --pp; 
+       pp = task_pt_regs(tsk);
 
        ptregs = *pp; 
        ptregs.cs &= 0xffff;
index 59ed778eb9de73a53d73ec578af881efb20f359e..af58b6f8bacaf2723f37d0d64be152ac1d15bc18 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/processor.h>
 #include <linux/console.h>
 #include <linux/seq_file.h>
+#include <linux/crash_dump.h>
 #include <linux/root_dev.h>
 #include <linux/pci.h>
 #include <linux/acpi.h>
@@ -42,6 +43,9 @@
 #include <linux/edd.h>
 #include <linux/mmzone.h>
 #include <linux/kexec.h>
+#include <linux/cpufreq.h>
+#include <linux/dmi.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/mtrr.h>
 #include <asm/uaccess.h>
@@ -60,7 +64,9 @@
 #include <asm/setup.h>
 #include <asm/mach_apic.h>
 #include <asm/numa.h>
+#include <asm/swiotlb.h>
 #include <asm/sections.h>
+#include <asm/gart-mapping.h>
 #ifdef CONFIG_XEN
 #include <linux/percpu.h>
 #include <xen/interface/physdev.h>
@@ -121,11 +127,6 @@ int bootloader_type;
 
 unsigned long saved_video_mode;
 
-#ifdef CONFIG_SWIOTLB
-int swiotlb;
-EXPORT_SYMBOL(swiotlb);
-#endif
-
 /*
  * Setup options
  */
@@ -316,19 +317,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
 {
        char c = ' ', *to = command_line, *from = COMMAND_LINE;
        int len = 0;
-
-       /* Save unparsed command line copy for /proc/cmdline */
-#ifdef CONFIG_XEN
-       int max_cmdline;
-       
-       if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
-               max_cmdline = COMMAND_LINE_SIZE;
-       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
-       saved_command_line[max_cmdline-1] = '\0';
-#else
-       memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
-       saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
-#endif
+       int userdef = 0;
 
        for (;;) {
                if (c != ' ') 
@@ -392,10 +381,14 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                    !memcmp(from, "disableapic", 11))
                        disable_apic = 1;
 
-               if (!memcmp(from, "noapic", 6)) 
+               /* Don't confuse with noapictimer */
+               if (!memcmp(from, "noapic", 6) &&
+                       (from[6] == ' ' || from[6] == 0))
                        skip_ioapic_setup = 1;
 
-               if (!memcmp(from, "apic", 4)) { 
+               /* Make sure to not confuse with apic= */
+               if (!memcmp(from, "apic", 4) &&
+                       (from[4] == ' ' || from[4] == 0)) {
                        skip_ioapic_setup = 0;
                        ioapic_force = 1;
                }
@@ -404,16 +397,36 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                if (!memcmp(from, "mem=", 4))
                        parse_memopt(from+4, &from); 
 
+               if (!memcmp(from, "memmap=", 7)) {
+                       /* exactmap option is for used defined memory */
+                       if (!memcmp(from+7, "exactmap", 8)) {
+#ifdef CONFIG_CRASH_DUMP
+                               /* If we are doing a crash dump, we
+                                * still need to know the real mem
+                                * size before original memory map is
+                                * reset.
+                                */
+                               saved_max_pfn = e820_end_of_ram();
+#endif
+                               from += 8+7;
+                               end_pfn_map = 0;
+                               e820.nr_map = 0;
+                               userdef = 1;
+                       }
+                       else {
+                               parse_memmapopt(from+7, &from);
+                               userdef = 1;
+                       }
+               }
+
 #ifdef CONFIG_NUMA
                if (!memcmp(from, "numa=", 5))
                        numa_setup(from+5); 
 #endif
 
-#ifdef CONFIG_GART_IOMMU 
                if (!memcmp(from,"iommu=",6)) { 
                        iommu_setup(from+6); 
                }
-#endif
 
                if (!memcmp(from,"oops=panic", 10))
                        panic_on_oops = 1;
@@ -442,6 +455,14 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                }
 #endif
 
+#ifdef CONFIG_PROC_VMCORE
+               /* elfcorehdr= specifies the location of elf core header
+                * stored by the crashed kernel. This option will be passed
+                * by kexec loader to the capture kernel.
+                */
+               else if(!memcmp(from, "elfcorehdr=", 11))
+                       elfcorehdr_addr = memparse(from+11, &from);
+#endif
        next_char:
                c = *(from++);
                if (!c)
@@ -450,6 +471,10 @@ static __init void parse_cmdline_early (char ** cmdline_p)
                        break;
                *(to++) = c;
        }
+       if (userdef) {
+               printk(KERN_INFO "user-defined physical RAM map:\n");
+               e820_print_map("user");
+       }
        *to = '\0';
        *cmdline_p = command_line;
 }
@@ -504,6 +529,8 @@ static unsigned char *k8_nops[ASM_NOP_MAX+1] = {
      k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 }; 
 
+extern char __vsyscall_0;
+
 /* Replace instructions with better alternatives for this CPU type.
 
    This runs before SMP is initialized to avoid SMP problems with
@@ -515,11 +542,17 @@ void apply_alternatives(void *start, void *end)
        struct alt_instr *a; 
        int diff, i, k;
        for (a = start; (void *)a < end; a++) { 
+               u8 *instr;
+
                if (!boot_cpu_has(a->cpuid))
                        continue;
 
                BUG_ON(a->replacementlen > a->instrlen); 
-               __inline_memcpy(a->instr, a->replacement, a->replacementlen); 
+               instr = a->instr;
+               /* vsyscall code is not mapped yet. resolve it manually. */
+               if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END)
+                       instr -= VSYSCALL_START - (unsigned long)&__vsyscall_0;
+               __inline_memcpy(instr, a->replacement, a->replacementlen);
                diff = a->instrlen - a->replacementlen; 
 
                /* Pad the rest with nops */
@@ -527,7 +560,7 @@ void apply_alternatives(void *start, void *end)
                        k = diff;
                        if (k > ASM_NOP_MAX)
                                k = ASM_NOP_MAX;
-                       __inline_memcpy(a->instr + i, k8_nops[k], k); 
+                       __inline_memcpy(instr + i, k8_nops[k], k);
                } 
        }
 } 
@@ -869,6 +902,8 @@ void __init setup_arch(char **cmdline_p)
        acpi_boot_init();
 #endif
 
+       init_cpu_to_node();
+
 #ifdef CONFIG_X86_LOCAL_APIC
        /*
         * get boot-time SMP configuration:
@@ -1074,7 +1109,6 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
 static int __init init_amd(struct cpuinfo_x86 *c)
 {
        int r;
-       int level;
 
 #ifdef CONFIG_SMP
        unsigned long value;
@@ -1097,11 +1131,6 @@ static int __init init_amd(struct cpuinfo_x86 *c)
           3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
        clear_bit(0*32+31, &c->x86_capability);
        
-       /* C-stepping K8? */
-       level = cpuid_eax(1);
-       if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)
-               set_bit(X86_FEATURE_K8_C, &c->x86_capability);
-
        r = get_model_name(c);
        if (!r) { 
                switch (c->x86) { 
@@ -1114,6 +1143,10 @@ static int __init init_amd(struct cpuinfo_x86 *c)
        } 
        display_cacheinfo(c);
 
+       /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
+       if (c->x86_power & (1<<8))
+               set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
+
        if (c->extended_cpuid_level >= 0x80000008) {
                c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
                if (c->x86_max_cores & (c->x86_max_cores - 1))
@@ -1232,8 +1265,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
 
        if (c->x86 == 15)
                c->x86_cache_alignment = c->x86_clflush_size * 2;
-       if (c->x86 >= 15)
+       if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
+           (c->x86 == 0x6 && c->x86_model >= 0x0e))
                set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
+       set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
        c->x86_max_cores = intel_num_cpu_cores(c);
 
        srat_detect_node();
@@ -1432,7 +1467,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL,
-               NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
+               NULL, "fxsr_opt", "rdtscp", NULL, NULL, "lm", "3dnowext", "3dnow",
 
                /* Transmeta-defined */
                "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -1460,7 +1495,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* AMD-defined (#2) */
-               "lahf_lm", "cmp_legacy", NULL, NULL, NULL, NULL, NULL, NULL,
+               "lahf_lm", "cmp_legacy", "svm", NULL, "cr8_legacy", NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1471,7 +1506,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                "vid",  /* voltage id control */
                "ttp",  /* thermal trip */
                "tm",
-               "stc"
+               "stc",
+               NULL,
+               /* nothing */   /* constant_tsc - moved to flags */
        };
 
 
@@ -1497,8 +1534,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                seq_printf(m, "stepping\t: unknown\n");
        
        if (cpu_has(c,X86_FEATURE_TSC)) {
+               unsigned int freq = cpufreq_quick_get((unsigned)(c-cpu_data));
+               if (!freq)
+                       freq = cpu_khz;
                seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
-                            cpu_khz / 1000, (cpu_khz % 1000));
+                            freq / 1000, (freq % 1000));
        }
 
        /* Cache size */
@@ -1548,8 +1588,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                unsigned i;
                for (i = 0; i < 32; i++) 
                        if (c->x86_power & (1 << i)) {
-                               if (i < ARRAY_SIZE(x86_power_flags))
-                                       seq_printf(m, " %s", x86_power_flags[i]);
+                               if (i < ARRAY_SIZE(x86_power_flags) &&
+                                       x86_power_flags[i])
+                                       seq_printf(m, "%s%s",
+                                               x86_power_flags[i][0]?" ":"",
+                                               x86_power_flags[i]);
                                else
                                        seq_printf(m, " [%d]", i);
                        }
@@ -1581,3 +1624,11 @@ struct seq_operations cpuinfo_op = {
        .stop = c_stop,
        .show = show_cpuinfo,
 };
+
+static int __init run_dmi_scan(void)
+{
+       dmi_scan_machine();
+       return 0;
+}
+core_initcall(run_dmi_scan);
+
index 0e202d2888fb84f3a8565e9f0c0c1d84f46c5b6f..a76d6465903f9287fecb6533b138d741305b9968 100644 (file)
@@ -37,14 +37,15 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
 
 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
-struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; 
+struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
+struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
 
 struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; 
 
 char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
 
 unsigned long __supported_pte_mask __read_mostly = ~0UL;
-static int do_not_nx __initdata = 0;
+static int do_not_nx __cpuinitdata = 0;
 
 /* noexec=on|off
 Control non executable mappings for 64bit processes.
@@ -117,7 +118,7 @@ void __init setup_per_cpu_areas(void)
                }
                if (!ptr)
                        panic("Cannot allocate cpu data for CPU %d\n", i);
-               cpu_pda[i].data_offset = ptr - __per_cpu_start;
+               cpu_pda(i)->data_offset = ptr - __per_cpu_start;
                memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
        }
 } 
@@ -167,15 +168,14 @@ void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
 
 void pda_init(int cpu)
 { 
-       struct x8664_pda *pda = &cpu_pda[cpu];
+       struct x8664_pda *pda = cpu_pda(cpu);
 
        /* Setup up data that may be needed in __get_free_pages early */
        asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); 
 #ifndef CONFIG_XEN
-       wrmsrl(MSR_GS_BASE, cpu_pda + cpu);
+       wrmsrl(MSR_GS_BASE, pda);
 #else
-       HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, 
-                                   (unsigned long)(cpu_pda + cpu));
+       HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, (unsigned long)pda);
 #endif
        pda->cpunumber = cpu; 
        pda->irqcount = -1;
@@ -203,7 +203,7 @@ void pda_init(int cpu)
        pda->irqstackptr += IRQSTACKSIZE-64;
 } 
 
-char boot_exception_stacks[N_EXCEPTION_STACKS * EXCEPTION_STKSZ] 
+char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
 __attribute__((section(".bss.page_aligned")));
 
 /* May not be marked __init: used by software suspend */
@@ -272,28 +272,18 @@ void __cpuinit cpu_init (void)
         * Initialize the per-CPU GDT with the boot GDT,
         * and set up the GDT descriptor:
         */
-#ifndef CONFIG_XEN 
-       if (cpu) {
-               memcpy(cpu_gdt_table[cpu], cpu_gdt_table[0], GDT_SIZE);
-       }       
+       if (cpu)
+               memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
 
        cpu_gdt_descr[cpu].size = GDT_SIZE;
-       cpu_gdt_descr[cpu].address = (unsigned long)cpu_gdt_table[cpu];
-
-       memcpy(me->thread.tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES * 8);
+#ifndef CONFIG_XEN 
+       asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu]));
+       asm volatile("lidt %0" :: "m" (idt_descr));
 #else
-       memcpy(me->thread.tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
-           GDT_ENTRY_TLS_ENTRIES * 8);
-
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 #endif
-       
-       /*
-        * Delete NT
-        */
-
-       asm volatile("pushfq ; popq %%rax ; btr $14,%%rax ; pushq %%rax ; popfq" ::: "eax");
 
+       memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
        syscall_init();
 
        wrmsrl(MSR_FS_BASE, 0);
@@ -307,13 +297,27 @@ void __cpuinit cpu_init (void)
         */
        for (v = 0; v < N_EXCEPTION_STACKS; v++) {
                if (cpu) {
-                       estacks = (char *)__get_free_pages(GFP_ATOMIC, 
-                                                  EXCEPTION_STACK_ORDER);
+                       static const unsigned int order[N_EXCEPTION_STACKS] = {
+                               [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STACK_ORDER,
+                               [DEBUG_STACK - 1] = DEBUG_STACK_ORDER
+                       };
+
+                       estacks = (char *)__get_free_pages(GFP_ATOMIC, order[v]);
                        if (!estacks)
                                panic("Cannot allocate exception stack %ld %d\n",
                                      v, cpu); 
                }
-               estacks += EXCEPTION_STKSZ;
+               switch (v + 1) {
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               case DEBUG_STACK:
+                       cpu_pda[cpu].debugstack = (unsigned long)estacks;
+                       estacks += DEBUG_STKSZ;
+                       break;
+#endif
+               default:
+                       estacks += EXCEPTION_STKSZ;
+                       break;
+               }
                t->ist[v] = (unsigned long)estacks;
        }
 
index 22db7bb8e8956cb6b42b9278ec791c9f8f543ac4..148bb939f23207e6a3b51e85091f8a0b409f8c2d 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/mmu_context.h>
 #include <asm/proto.h>
 #include <asm/apicdef.h>
+#include <asm/idle.h>
 #ifdef CONFIG_XEN
 #include <xen/evtchn.h>
 #endif
@@ -298,11 +299,6 @@ void flush_tlb_all(void)
 { xen_tlb_flush_all(); }
 #endif /* Xen */
 
-void smp_kdb_stop(void)
-{
-       send_IPI_allbutself(KDB_VECTOR);
-}
-
 /*
  * this function sends a 'reschedule' IPI to another CPU.
  * it goes straight through and wastes no time serializing
@@ -558,6 +554,7 @@ asmlinkage irqreturn_t smp_call_function_interrupt(void)
        /*
         * At this point the info structure may be out of scope unless wait==1
         */
+       exit_idle();
        irq_enter();
        (*func)(info);
        irq_exit();
index 4d4b9c61c535c8eec5714af9c1630c692fc6c2be..f3695d8c2e8eef33bc3b7dd35ee94a8ff8367483 100644 (file)
@@ -70,7 +70,6 @@ asmlinkage void reserved(void);
 asmlinkage void alignment_check(void);
 asmlinkage void machine_check(void);
 asmlinkage void spurious_interrupt_bug(void);
-asmlinkage void call_debug(void);
 
 struct notifier_block *die_chain;
 static DEFINE_SPINLOCK(die_notifier_lock);
@@ -121,19 +120,31 @@ int printk_address(unsigned long address)
 static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
                                        unsigned *usedp, const char **idp)
 {
-       static const char ids[N_EXCEPTION_STACKS][8] = {
+       static char ids[][8] = {
                [DEBUG_STACK - 1] = "#DB",
                [NMI_STACK - 1] = "NMI",
                [DOUBLEFAULT_STACK - 1] = "#DF",
                [STACKFAULT_STACK - 1] = "#SS",
                [MCE_STACK - 1] = "#MC",
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               [N_EXCEPTION_STACKS ... N_EXCEPTION_STACKS + DEBUG_STKSZ / EXCEPTION_STKSZ - 2] = "#DB[?]"
+#endif
        };
        unsigned k;
 
        for (k = 0; k < N_EXCEPTION_STACKS; k++) {
                unsigned long end;
 
-               end = per_cpu(init_tss, cpu).ist[k];
+               switch (k + 1) {
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               case DEBUG_STACK:
+                       end = cpu_pda(cpu)->debugstack + DEBUG_STKSZ;
+                       break;
+#endif
+               default:
+                       end = per_cpu(init_tss, cpu).ist[k];
+                       break;
+               }
                if (stack >= end)
                        continue;
                if (stack >= end - EXCEPTION_STKSZ) {
@@ -143,6 +154,22 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
                        *idp = ids[k];
                        return (unsigned long *)end;
                }
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               if (k == DEBUG_STACK - 1 && stack >= end - DEBUG_STKSZ) {
+                       unsigned j = N_EXCEPTION_STACKS - 1;
+
+                       do {
+                               ++j;
+                               end -= EXCEPTION_STKSZ;
+                               ids[j][4] = '1' + (j - N_EXCEPTION_STACKS);
+                       } while (stack < end - EXCEPTION_STKSZ);
+                       if (*usedp & (1U << j))
+                               break;
+                       *usedp |= 1U << j;
+                       *idp = ids[j];
+                       return (unsigned long *)end;
+               }
+#endif
        }
        return NULL;
 }
@@ -156,9 +183,8 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
 
 void show_trace(unsigned long *stack)
 {
-       unsigned long addr;
        const unsigned cpu = safe_smp_processor_id();
-       unsigned long *irqstack_end = (unsigned long *)cpu_pda[cpu].irqstackptr;
+       unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr;
        int i;
        unsigned used = 0;
 
@@ -166,8 +192,14 @@ void show_trace(unsigned long *stack)
 
 #define HANDLE_STACK(cond) \
        do while (cond) { \
-               addr = *stack++; \
+               unsigned long addr = *stack++; \
                if (kernel_text_address(addr)) { \
+                       if (i > 50) { \
+                               printk("\n       "); \
+                               i = 0; \
+                       } \
+                       else \
+                               i += printk(" "); \
                        /* \
                         * If the address is either in the text segment of the \
                         * kernel, or in the region which contains vmalloc'ed \
@@ -177,25 +209,19 @@ void show_trace(unsigned long *stack)
                         * out the call path that was taken. \
                         */ \
                        i += printk_address(addr); \
-                       if (i > 50) { \
-                               printk("\n       "); \
-                               i = 0; \
-                       } \
-                       else \
-                               i += printk(" "); \
                } \
        } while (0)
 
-       for(i = 0; ; ) {
+       for(i = 11; ; ) {
                const char *id;
                unsigned long *estack_end;
                estack_end = in_exception_stack(cpu, (unsigned long)stack,
                                                &used, &id);
 
                if (estack_end) {
-                       i += printk(" <%s> ", id);
+                       i += printk(" <%s>", id);
                        HANDLE_STACK (stack < estack_end);
-                       i += printk(" <EOE> ");
+                       i += printk(" <EOE>");
                        stack = (unsigned long *) estack_end[-2];
                        continue;
                }
@@ -205,11 +231,11 @@ void show_trace(unsigned long *stack)
                                (IRQSTACKSIZE - 64) / sizeof(*irqstack);
 
                        if (stack >= irqstack && stack < irqstack_end) {
-                               i += printk(" <IRQ> ");
+                               i += printk(" <IRQ>");
                                HANDLE_STACK (stack < irqstack_end);
                                stack = (unsigned long *) (irqstack_end[-1]);
                                irqstack_end = NULL;
-                               i += printk(" <EOI> ");
+                               i += printk(" <EOI>");
                                continue;
                        }
                }
@@ -226,8 +252,8 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp)
        unsigned long *stack;
        int i;
        const int cpu = safe_smp_processor_id();
-       unsigned long *irqstack_end = (unsigned long *) (cpu_pda[cpu].irqstackptr);
-       unsigned long *irqstack = (unsigned long *) (cpu_pda[cpu].irqstackptr - IRQSTACKSIZE);    
+       unsigned long *irqstack_end = (unsigned long *) (cpu_pda(cpu)->irqstackptr);
+       unsigned long *irqstack = (unsigned long *) (cpu_pda(cpu)->irqstackptr - IRQSTACKSIZE);
 
        // debugging aid: "show_stack(NULL, NULL);" prints the
        // back trace for this cpu.
@@ -275,14 +301,14 @@ void show_registers(struct pt_regs *regs)
        int in_kernel = !user_mode(regs);
        unsigned long rsp;
        const int cpu = safe_smp_processor_id(); 
-       struct task_struct *cur = cpu_pda[cpu].pcurrent; 
+       struct task_struct *cur = cpu_pda(cpu)->pcurrent;
 
                rsp = regs->rsp;
 
        printk("CPU %d ", cpu);
        __show_regs(regs);
        printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
-               cur->comm, cur->pid, cur->thread_info, cur);
+               cur->comm, cur->pid, task_thread_info(cur), cur);
 
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -314,20 +340,26 @@ bad:
 void handle_BUG(struct pt_regs *regs)
 { 
        struct bug_frame f;
-       char tmp;
+       long len;
+       const char *prefix = "";
 
        if (user_mode(regs))
                return; 
-       if (__copy_from_user(&f, (struct bug_frame *) regs->rip, 
+       if (__copy_from_user(&f, (const void __user *) regs->rip,
                             sizeof(struct bug_frame)))
                return; 
        if (f.filename >= 0 ||
            f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) 
                return;
-       if (__get_user(tmp, (char *)(long)f.filename))
+       len = __strnlen_user((char *)(long)f.filename, PATH_MAX) - 1;
+       if (len < 0 || len >= PATH_MAX)
                f.filename = (int)(long)"unmapped filename";
+       else if (len > 50) {
+               f.filename += len - 50;
+               prefix = "...";
+       }
        printk("----------- [cut here ] --------- [please bite here ] ---------\n");
-       printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", (char *)(long)f.filename, f.line);
+       printk(KERN_ALERT "Kernel BUG at %s%.50s:%d\n", prefix, (char *)(long)f.filename, f.line);
 } 
 
 #ifdef CONFIG_BUG
@@ -382,7 +414,7 @@ void __die(const char * str, struct pt_regs * regs, long err)
        printk("DEBUG_PAGEALLOC");
 #endif
        printk("\n");
-       notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
+       notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
        show_registers(regs);
        /* Executive summary in case the oops scrolled away */
        printk(KERN_ALERT "RIP ");
@@ -399,11 +431,6 @@ void die(const char * str, struct pt_regs * regs, long err)
        oops_end(flags);
        do_exit(SIGSEGV); 
 }
-static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
-{
-       if (!(regs->eflags & VM_MASK) && (regs->cs == __KERNEL_CS))
-               die(str, regs, err);
-}
 
 #ifdef CONFIG_X86_LOCAL_APIC
 void die_nmi(char *str, struct pt_regs *regs)
@@ -428,19 +455,20 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
                              struct pt_regs * regs, long error_code,
                              siginfo_t *info)
 {
+       struct task_struct *tsk = current;
+
        conditional_sti(regs);
 
-       if (user_mode(regs)) {
-               struct task_struct *tsk = current;
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = trapnr;
 
+       if (user_mode(regs)) {
                if (exception_trace && unhandled_signal(tsk, signr))
                        printk(KERN_INFO
                               "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n",
                               tsk->comm, tsk->pid, str,
                               regs->rip,regs->rsp,error_code); 
 
-               tsk->thread.error_code = error_code;
-               tsk->thread.trap_no = trapnr;
                if (info)
                        force_sig_info(signr, info, tsk);
                else
@@ -487,7 +515,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
 DO_ERROR_INFO( 0, SIGFPE,  "divide error", divide_error, FPE_INTDIV, regs->rip)
 DO_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, regs->rip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->rip)
 DO_ERROR( 7, SIGSEGV, "device not available", device_not_available)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
@@ -495,24 +523,41 @@ DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
 DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
 DO_ERROR(18, SIGSEGV, "reserved", reserved)
 DO_ERROR(12, SIGBUS,  "stack segment", stack_segment)
-DO_ERROR( 8, SIGSEGV, "double fault", double_fault)
+
+asmlinkage void do_double_fault(struct pt_regs * regs, long error_code)
+{
+       static const char str[] = "double fault";
+       struct task_struct *tsk = current;
+
+       /* Return not checked because double check cannot be ignored */
+       notify_die(DIE_TRAP, str, regs, error_code, 8, SIGSEGV);
+
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = 8;
+
+       /* This is always a kernel trap and never fixable (and thus must
+          never return). */
+       for (;;)
+               die(str, regs, error_code);
+}
 
 asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
                                                long error_code)
 {
+       struct task_struct *tsk = current;
+
        conditional_sti(regs);
 
-       if (user_mode(regs)) {
-               struct task_struct *tsk = current;
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = 13;
 
+       if (user_mode(regs)) {
                if (exception_trace && unhandled_signal(tsk, SIGSEGV))
                        printk(KERN_INFO
                       "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n",
                               tsk->comm, tsk->pid,
                               regs->rip,regs->rsp,error_code); 
 
-               tsk->thread.error_code = error_code;
-               tsk->thread.trap_no = 13;
                force_sig(SIGSEGV, tsk);
                return;
        } 
@@ -579,7 +624,7 @@ asmlinkage void default_do_nmi(struct pt_regs *regs)
                reason = get_nmi_reason();
 
        if (!(reason & 0xc0)) {
-               if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT)
+               if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
                                                                == NOTIFY_STOP)
                        return;
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -595,7 +640,7 @@ asmlinkage void default_do_nmi(struct pt_regs *regs)
                unknown_nmi_error(reason, regs);
                return;
        }
-       if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP)
+       if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
                return; 
 
        /* AK: following checks seem to be broken on modern chipsets. FIXME */
@@ -606,6 +651,7 @@ asmlinkage void default_do_nmi(struct pt_regs *regs)
                io_check_error(reason, regs);
 }
 
+/* runs on IST stack. */
 asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
 {
        if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) {
@@ -626,7 +672,7 @@ asmlinkage struct pt_regs *sync_regs(struct pt_regs *eregs)
                ;
        /* Exception from user space */
        else if (user_mode(eregs))
-               regs = ((struct pt_regs *)current->thread.rsp0) - 1;
+               regs = task_pt_regs(current);
        /* Exception from kernel and interrupts are enabled. Move to
           kernel process stack. */
        else if (eregs->eflags & X86_EFLAGS_IF)
@@ -690,11 +736,9 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,
        info.si_signo = SIGTRAP;
        info.si_errno = 0;
        info.si_code = TRAP_BRKPT;
-       if (!user_mode(regs))
-               goto clear_dr7; 
+       info.si_addr = user_mode(regs) ? (void __user *)regs->rip : NULL;
+       force_sig_info(SIGTRAP, &info, tsk);
 
-       info.si_addr = (void __user *)regs->rip;
-       force_sig_info(SIGTRAP, &info, tsk);    
 clear_dr7:
        set_debugreg(0UL, 7);
        return;
@@ -704,7 +748,7 @@ clear_TF_reenable:
        regs->eflags &= ~TF_MASK;
 }
 
-static int kernel_math_error(struct pt_regs *regs, char *str)
+static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr)
 {
        const struct exception_table_entry *fixup;
        fixup = search_exception_tables(regs->rip);
@@ -712,8 +756,9 @@ static int kernel_math_error(struct pt_regs *regs, char *str)
                regs->rip = fixup->fixup;
                return 1;
        }
-       notify_die(DIE_GPF, str, regs, 0, 16, SIGFPE);
+       notify_die(DIE_GPF, str, regs, 0, trapnr, SIGFPE);
        /* Illegal floating point operation in the kernel */
+       current->thread.trap_no = trapnr;
        die(str, regs, 0);
        return 0;
 }
@@ -732,7 +777,7 @@ asmlinkage void do_coprocessor_error(struct pt_regs *regs)
 
        conditional_sti(regs);
        if (!user_mode(regs) &&
-           kernel_math_error(regs, "kernel x87 math error"))
+           kernel_math_error(regs, "kernel x87 math error", 16))
                return;
 
        /*
@@ -801,7 +846,7 @@ asmlinkage void do_simd_coprocessor_error(struct pt_regs *regs)
 
        conditional_sti(regs);
        if (!user_mode(regs) &&
-               kernel_math_error(regs, "kernel simd math error"))
+               kernel_math_error(regs, "kernel simd math error", 19))
                return;
 
        /*
@@ -875,12 +920,7 @@ asmlinkage void math_state_restore(void)
        if (!used_math())
                init_fpu(me);
        restore_fpu_checking(&me->thread.i387.fxsave);
-       me->thread_info->status |= TS_USEDFPU;
-}
-
-void do_call_debug(struct pt_regs *regs) 
-{ 
-       notify_die(DIE_CALL, "debug call", regs, 0, 255, SIGINT); 
+       task_thread_info(me)->status |= TS_USEDFPU;
 }
 
 
@@ -893,7 +933,7 @@ static trap_info_t trap_table[] = {
         {  1, 0|4, (__KERNEL_CS|0x3), (unsigned long)debug                      },
         {  3, 3|4, (__KERNEL_CS|0x3), (unsigned long)int3                       },
         {  4, 3|4, (__KERNEL_CS|0x3), (unsigned long)overflow                   },
-        {  5, 3|4, (__KERNEL_CS|0x3), (unsigned long)bounds                     },
+        {  5, 0|4, (__KERNEL_CS|0x3), (unsigned long)bounds                     },
         {  6, 0|4, (__KERNEL_CS|0x3), (unsigned long)invalid_op                 },
         {  7, 0|4, (__KERNEL_CS|0x3), (unsigned long)device_not_available       },
         {  9, 0|4, (__KERNEL_CS|0x3), (unsigned long)coprocessor_segment_overrun},
index 57634c702ebdae49f03678b1cd1b889c2857b688..190834bfba28f5ae750badf378214cb086f61e66 100644 (file)
 #include <asm/io.h>
 
 #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr)))
-#define force_inline __attribute__((always_inline)) inline
 
 int __sysctl_vsyscall __section_sysctl_vsyscall = 1;
 seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED;
 
 #include <asm/unistd.h>
 
-static force_inline void timeval_normalize(struct timeval * tv)
+static __always_inline void timeval_normalize(struct timeval * tv)
 {
        time_t __sec;
 
@@ -53,7 +52,7 @@ static force_inline void timeval_normalize(struct timeval * tv)
        }
 }
 
-static force_inline void do_vgettimeofday(struct timeval * tv)
+static __always_inline void do_vgettimeofday(struct timeval * tv)
 {
        long sequence, t;
        unsigned long sec, usec;
@@ -66,8 +65,7 @@ static force_inline void do_vgettimeofday(struct timeval * tv)
                        (__jiffies - __wall_jiffies) * (1000000 / HZ);
 
                if (__vxtime.mode != VXTIME_HPET) {
-                       sync_core();
-                       rdtscll(t);
+                       t = get_cycles_sync();
                        if (t < __vxtime.last_tsc)
                                t = __vxtime.last_tsc;
                        usec += ((t - __vxtime.last_tsc) *
@@ -84,12 +82,12 @@ static force_inline void do_vgettimeofday(struct timeval * tv)
 }
 
 /* RED-PEN may want to readd seq locking, but then the variable should be write-once. */
-static force_inline void do_get_tz(struct timezone * tz)
+static __always_inline void do_get_tz(struct timezone * tz)
 {
        *tz = __sys_tz;
 }
 
-static force_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+static __always_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
 {
        int ret;
        asm volatile("vsysc2: syscall"
@@ -98,7 +96,7 @@ static force_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
        return ret;
 }
 
-static force_inline long time_syscall(long *t)
+static __always_inline long time_syscall(long *t)
 {
        long secs;
        asm volatile("vsysc1: syscall"
index 5eb279f22dadd0ee2a5c5f70695e785aefce19f7..65ad5b37e2de8378250ef1c548ecadad889f36e6 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/string.h>
 #include <linux/syscalls.h>
 #include <linux/tty.h>
-#include <linux/ioctl32.h>
 
 #include <asm/semaphore.h>
 #include <asm/processor.h>
@@ -45,24 +44,17 @@ extern struct drive_info_struct drive_info;
 EXPORT_SYMBOL(drive_info);
 #endif
 
-extern unsigned long get_cmos_time(void);
-
 /* platform dependent support */
 EXPORT_SYMBOL(boot_cpu_data);
 //EXPORT_SYMBOL(dump_fpu);
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(ioremap_nocache);
 EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(enable_irq);
-EXPORT_SYMBOL(disable_irq);
-EXPORT_SYMBOL(disable_irq_nosync);
-EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(pm_idle);
 #ifdef CONFIG_ACPI_BOOT
 EXPORT_SYMBOL(pm_power_off);
 #endif
-EXPORT_SYMBOL(get_cmos_time);
 
 EXPORT_SYMBOL(__down_failed);
 EXPORT_SYMBOL(__down_failed_interruptible);
@@ -86,9 +78,6 @@ EXPORT_SYMBOL(__put_user_2);
 EXPORT_SYMBOL(__put_user_4);
 EXPORT_SYMBOL(__put_user_8);
 
-EXPORT_SYMBOL(strpbrk);
-EXPORT_SYMBOL(strstr);
-
 EXPORT_SYMBOL(strncpy_from_user);
 EXPORT_SYMBOL(__strncpy_from_user);
 EXPORT_SYMBOL(clear_user);
@@ -99,11 +88,6 @@ EXPORT_SYMBOL(copy_to_user);
 EXPORT_SYMBOL(copy_in_user);
 EXPORT_SYMBOL(strnlen_user);
 
-#ifdef CONFIG_PCI
-EXPORT_SYMBOL(pci_alloc_consistent);
-EXPORT_SYMBOL(pci_free_consistent);
-#endif
-
 #ifdef CONFIG_PCI
 EXPORT_SYMBOL(pci_mem_start);
 #endif
@@ -111,12 +95,11 @@ EXPORT_SYMBOL(pci_mem_start);
 EXPORT_SYMBOL(copy_page);
 EXPORT_SYMBOL(clear_page);
 
-EXPORT_SYMBOL(cpu_pda);
+EXPORT_SYMBOL(_cpu_pda);
 #ifdef CONFIG_SMP
 EXPORT_SYMBOL(__write_lock_failed);
 EXPORT_SYMBOL(__read_lock_failed);
 
-EXPORT_SYMBOL(synchronize_irq);
 EXPORT_SYMBOL(smp_call_function);
 #endif
 
@@ -138,30 +121,17 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback);
 #undef memcpy
 #undef memset
 #undef memmove
-#undef memchr
 #undef strlen
-#undef strncmp
-#undef strncpy
-#undef strchr  
 
 extern void * memset(void *,int,__kernel_size_t);
 extern size_t strlen(const char *);
 extern void * memmove(void * dest,const void *src,size_t count);
-extern void *memchr(const void *s, int c, size_t n);
 extern void * memcpy(void *,const void *,__kernel_size_t);
 extern void * __memcpy(void *,const void *,__kernel_size_t);
 
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(strlen);
 EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(strncmp);
-EXPORT_SYMBOL(strncpy);
-EXPORT_SYMBOL(strchr);
-EXPORT_SYMBOL(strncat);
-EXPORT_SYMBOL(memchr);
-EXPORT_SYMBOL(strrchr);
-EXPORT_SYMBOL(strnlen);
-EXPORT_SYMBOL(memscan);
 EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(__memcpy);
 
index 48252d17a7ea7dd55d24dcaaf126393a3e4f0f10..7d6ceaef465b77b4be0c6942fa60798c5de7ebc9 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux x86_64-specific parts of the memory manager.
 #
 
-obj-y   := init.o fault.o ioremap.o extable.o pageattr.o
+obj-y   := init.o fault.o ioremap.o extable.o pageattr.o mmap.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
index 62f0bd6dfed130f50a2e8f15cfd015d177a8b0da..37e97eeb57ad1a913d9c832e916df0afa638921c 100644 (file)
 #include <asm-generic/sections.h>
 #include <asm/kdebug.h>
 
+/* Page fault error code bits */
+#define PF_PROT        (1<<0)          /* or no page found */
+#define PF_WRITE       (1<<1)
+#define PF_USER        (1<<2)
+#define PF_RSVD        (1<<3)
+#define PF_INSTR       (1<<4)
+
 void bust_spinlocks(int yes)
 {
        int loglevel_save = console_loglevel;
@@ -68,7 +75,7 @@ static noinline int is_prefetch(struct pt_regs *regs, unsigned long addr,
        unsigned char *max_instr;
 
        /* If it was a exec fault ignore */
-       if (error_code & (1<<4))
+       if (error_code & PF_INSTR)
                return 0;
        
        instr = (unsigned char *)convert_rip_to_linear(current, regs);
@@ -223,17 +230,22 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
                                 unsigned long error_code)
 {
        unsigned long flags = oops_begin();
+       struct task_struct *tsk;
 
        printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
               current->comm, address);
        dump_pagetable(address);
+       tsk = current;
+       tsk->thread.cr2 = address;
+       tsk->thread.trap_no = 14;
+       tsk->thread.error_code = error_code;
        __die("Bad pagetable", regs, error_code);
        oops_end(flags);
        do_exit(SIGKILL);
 }
 
 /*
- * Handle a fault on the vmalloc or module mapping area
+ * Handle a fault on the vmalloc area
  *
  * This assumes no large pages in there.
  */
@@ -284,7 +296,6 @@ static int vmalloc_fault(unsigned long address)
           that. */
        if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref))
                BUG();
-       __flush_tlb_all();
        return 0;
 }
 
@@ -306,12 +317,6 @@ int exception_trace = 1;
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
  * routines.
- *
- * error_code:
- *     bit 0 == 0 means no page found, 1 means protection fault
- *     bit 1 == 0 means read, 1 means write
- *     bit 2 == 0 means kernel, 1 means user-mode
- *      bit 3 == 1 means fault was an instruction fetch
  */
 asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
                                        unsigned long error_code)
@@ -358,12 +363,16 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
         *
         * This verifies that the fault happens in kernel space
         * (error_code & 4) == 0, and that the fault was not a
-        * protection error (error_code & 1) == 0.
+        * protection error (error_code & 9) == 0.
         */
        if (unlikely(address >= TASK_SIZE64)) {
-               if (!(error_code & 5) &&
-                     ((address >= VMALLOC_START && address < VMALLOC_END) ||
-                      (address >= MODULES_VADDR && address < MODULES_END))) {
+               /*
+                * Don't check for the module range here: its PML4
+                * is always initialized because it's shared with the main
+                * kernel text. Only vmalloc may need PML4 syncups.
+                */
+               if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
+                     ((address >= VMALLOC_START && address < VMALLOC_END))) {
                        if (vmalloc_fault(address) < 0)
                                goto bad_area_nosemaphore;
                        return;
@@ -375,7 +384,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
                goto bad_area_nosemaphore;
        }
 
-       if (unlikely(error_code & (1 << 3)))
+       if (unlikely(error_code & PF_RSVD))
                pgtable_bad(address, regs, error_code);
 
        /*
@@ -402,7 +411,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
         * thus avoiding the deadlock.
         */
        if (!down_read_trylock(&mm->mmap_sem)) {
-               if ((error_code & 4) == 0 &&
+               if ((error_code & PF_USER) == 0 &&
                    !search_exception_tables(regs->rip))
                        goto bad_area_nosemaphore;
                down_read(&mm->mmap_sem);
@@ -429,17 +438,17 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
 good_area:
        info.si_code = SEGV_ACCERR;
        write = 0;
-       switch (error_code & 3) {
+       switch (error_code & (PF_PROT|PF_WRITE)) {
                default:        /* 3: write, present */
                        /* fall through */
-               case 2:         /* write, not present */
+               case PF_WRITE:          /* write, not present */
                        if (!(vma->vm_flags & VM_WRITE))
                                goto bad_area;
                        write++;
                        break;
-               case 1:         /* read, present */
+               case PF_PROT:           /* read, present */
                        goto bad_area;
-               case 0:         /* read, not present */
+               case 0:                 /* read, not present */
                        if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
                                goto bad_area;
        }
@@ -474,7 +483,7 @@ bad_area:
 
 bad_area_nosemaphore:
        /* User mode accesses just cause a SIGSEGV */
-       if (error_code & 4) {
+       if (error_code & PF_USER) {
                if (is_prefetch(regs, address, error_code))
                        return;
 
@@ -542,6 +551,9 @@ no_context:
        printk_address(regs->rip);
        printk("\n");
        dump_pagetable(address);
+       tsk->thread.cr2 = address;
+       tsk->thread.trap_no = 14;
+       tsk->thread.error_code = error_code;
        __die("Oops", regs, error_code);
        /* Executive summary in case the body of the oops scrolled away */
        printk(KERN_EMERG "CR2: %016lx\n", address);
@@ -567,7 +579,7 @@ do_sigbus:
        up_read(&mm->mmap_sem);
 
        /* Kernel mode? Handle exceptions or die */
-       if (!(error_code & 4))
+       if (!(error_code & PF_USER))
                goto no_context;
 
        tsk->thread.cr2 = address;
index b89a416c6426e28362c154c30f1f909a590d5c06..c8e3099e75013025b9430146ff82bd537e34515b 100644 (file)
@@ -26,6 +26,9 @@
 #include <linux/bootmem.h>
 #include <linux/proc_fs.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
+#include <linux/memory_hotplug.h>
 
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -41,6 +44,8 @@
 #include <asm/proto.h>
 #include <asm/smp.h>
 #include <asm/sections.h>
+#include <asm/dma-mapping.h>
+#include <asm/swiotlb.h>
 
 #include <xen/features.h>
 
@@ -48,6 +53,9 @@
 #define Dprintk(x...)
 #endif
 
+struct dma_mapping_ops* dma_ops;
+EXPORT_SYMBOL(dma_ops);
+
 extern unsigned long *contiguous_bitmap;
 
 #if defined(CONFIG_SWIOTLB)
@@ -374,16 +382,24 @@ unsigned long __initdata table_start, tables_space;
 
 unsigned long get_machine_pfn(unsigned long addr)
 {
-       pud_t* pud = pud_offset_k(addr);
+       pud_t* pud = pud_offset_k(NULL, addr);
        pmd_t* pmd = pmd_offset(pud, addr);
        pte_t *pte = pte_offset_kernel(pmd, addr);
 
        return pte_mfn(*pte);
 } 
 
-static __init void *alloc_static_page(unsigned long *phys)
+static __meminit void *alloc_static_page(unsigned long *phys)
 {
        unsigned long va = (start_pfn << PAGE_SHIFT) + __START_KERNEL_map;
+
+       if (after_bootmem) {
+               void *adr = (void *)get_zeroed_page(GFP_ATOMIC);
+
+               *phys = __pa(adr);
+               return adr;
+       }
+
        *phys = start_pfn << PAGE_SHIFT;
        start_pfn++;
        memset((void *)va, 0, PAGE_SIZE);
@@ -417,77 +433,86 @@ static inline int make_readonly(unsigned long paddr)
        return readonly;
 }
 
-static void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned long end)
+static void __meminit
+phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end)
+{
+       int i, k;
+
+       for (i = 0; i < PTRS_PER_PMD; pmd++, i++) {
+               unsigned long pte_phys;
+               pte_t *pte, *pte_save;
+
+               if (address >= end) {
+                       for (; i < PTRS_PER_PMD; i++, pmd++)
+                               set_pmd(pmd, __pmd(0));
+                       break;
+               }
+               pte = alloc_static_page(&pte_phys);
+               pte_save = pte;
+               for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
+                       if ((address >= end) ||
+                           ((address >> PAGE_SHIFT) >=
+                            xen_start_info->nr_pages)) { 
+                               __set_pte(pte, __pte(0)); 
+                               continue;
+                       }
+                       if (make_readonly(address)) {
+                               __set_pte(pte, 
+                                         __pte(address | (_KERNPG_TABLE & ~_PAGE_RW)));
+                               continue;
+                       }
+                       __set_pte(pte, __pte(address | _KERNPG_TABLE));
+               }
+               pte = pte_save;
+               early_make_page_readonly(pte, XENFEAT_writable_page_tables);
+               xen_pte_pin(pte_phys);
+               set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
+       }
+}
+
+static void __meminit
+phys_pmd_update(pud_t *pud, unsigned long address, unsigned long end)
+{
+       pmd_t *pmd = pmd_offset(pud, (unsigned long)__va(address));
+
+       if (pmd_none(*pmd)) {
+               spin_lock(&init_mm.page_table_lock);
+               phys_pmd_init(pmd, address, end);
+               spin_unlock(&init_mm.page_table_lock);
+               __flush_tlb_all();
+       }
+}
+
+static void __meminit phys_pud_init(pud_t *pud, unsigned long address, unsigned long end)
 { 
-       long i, j, k; 
-       unsigned long paddr;
+       long i = pud_index(address);
 
-       i = pud_index(address);
        pud = pud + i;
+
+       if (after_bootmem && pud_val(*pud)) {
+               phys_pmd_update(pud, address, end);
+               return;
+       }
+
        for (; i < PTRS_PER_PUD; pud++, i++) {
-               unsigned long pmd_phys;
+               unsigned long paddr, pmd_phys;
                pmd_t *pmd;
 
-               paddr = address + i*PUD_SIZE;
-               if (paddr >= end) { 
-                       for (; i < PTRS_PER_PUD; i++, pud++) 
-                               set_pud(pud, __pud(0)); 
+               paddr = (address & PGDIR_MASK) + i*PUD_SIZE;
+               if (paddr >= end)
                        break;
-               } 
 
                pmd = alloc_static_page(&pmd_phys);
                early_make_page_readonly(pmd, XENFEAT_writable_page_tables);
                xen_pmd_pin(pmd_phys);
+               spin_lock(&init_mm.page_table_lock);
                set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
-               for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
-                       unsigned long pte_phys;
-                       pte_t *pte, *pte_save;
-
-                       if (paddr >= end) { 
-                               for (; j < PTRS_PER_PMD; j++, pmd++)
-                                       set_pmd(pmd,  __pmd(0)); 
-                               break;
-                       }
-                       pte = alloc_static_page(&pte_phys);
-                       pte_save = pte;
-                       for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr += PTE_SIZE) {
-                               if ((paddr >= end) ||
-                                   ((paddr >> PAGE_SHIFT) >=
-                                    xen_start_info->nr_pages)) { 
-                                       __set_pte(pte, __pte(0)); 
-                                       continue;
-                               }
-                               if (make_readonly(paddr)) {
-                                       __set_pte(pte, 
-                                               __pte(paddr | (_KERNPG_TABLE & ~_PAGE_RW)));
-                                       continue;
-                               }
-                               __set_pte(pte, __pte(paddr | _KERNPG_TABLE));
-                       }
-                       pte = pte_save;
-                       early_make_page_readonly(
-                               pte, XENFEAT_writable_page_tables);
-                       xen_pte_pin(pte_phys);
-                       set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
-               }
+               phys_pmd_init(pmd, paddr, end);
+               spin_unlock(&init_mm.page_table_lock);
        }
        __flush_tlb();
 } 
 
-static void __init find_early_table_space(unsigned long end)
-{
-       unsigned long puds, pmds, ptes; 
-
-       puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
-       pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
-       ptes = (end + PTE_SIZE - 1) >> PAGE_SHIFT;
-
-       tables_space =
-               round_up(puds * 8, PAGE_SIZE) + 
-               round_up(pmds * 8, PAGE_SIZE) + 
-               round_up(ptes * 8, PAGE_SIZE); 
-}
-
 void __init xen_init_pt(void)
 {
        unsigned long addr, *page;
@@ -586,39 +611,71 @@ void __init extend_init_mapping(void)
        }
 }
 
+static void __init find_early_table_space(unsigned long end)
+{
+       unsigned long puds, pmds, ptes; 
+
+       puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
+       pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
+       ptes = (end + PTE_SIZE - 1) >> PAGE_SHIFT;
+
+       tables_space =
+               round_up(puds * 8, PAGE_SIZE) + 
+               round_up(pmds * 8, PAGE_SIZE) + 
+               round_up(ptes * 8, PAGE_SIZE); 
+
+       extend_init_mapping();
+
+       table_start = start_pfn;
+
+       early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n",
+               __pa(end), table_start << PAGE_SHIFT, start_pfn << PAGE_SHIFT);
+}
+
 /* Setup the direct mapping of the physical memory at PAGE_OFFSET.
    This runs before bootmem is initialized and gets pages directly from the 
    physical memory. To access them they are temporarily mapped. */
-void __init init_memory_mapping(unsigned long start, unsigned long end)
+void __meminit init_memory_mapping(unsigned long start, unsigned long end)
 { 
        unsigned long next; 
 
        Dprintk("init_memory_mapping\n");
 
-       find_early_table_space(end);
-       extend_init_mapping();
-
-       table_start = start_pfn;
+       /* 
+        * Find space for the kernel direct mapping tables.
+        * Later we should allocate these tables in the local node of the memory
+        * mapped.  Unfortunately this is done currently before the nodes are 
+        * discovered.
+        */
+       if (!after_bootmem)
+               find_early_table_space(end);
 
        start = (unsigned long)__va(start);
        end = (unsigned long)__va(end);
 
        for (; start < end; start = next) {
                unsigned long pud_phys; 
-               pud_t *pud = alloc_static_page(&pud_phys);
-               early_make_page_readonly(pud, XENFEAT_writable_page_tables);
+               pgd_t *pgd = pgd_offset_k(start);
+               pud_t *pud;
+
+               if (after_bootmem) {
+                       pud = pud_offset_k(pgd, __PAGE_OFFSET);
+                       make_page_readonly(pud, XENFEAT_writable_page_tables);
+                       pud_phys = __pa(pud);
+               } else {
+                       pud = alloc_static_page(&pud_phys);
+                       early_make_page_readonly(pud, XENFEAT_writable_page_tables);
+               }
                xen_pud_pin(pud_phys);
                next = start + PGDIR_SIZE;
                if (next > end) 
                        next = end; 
                phys_pud_init(pud, __pa(start), __pa(next));
-               set_pgd(pgd_offset_k(start), mk_kernel_pgd(pud_phys));
+               if (!after_bootmem)
+                       set_pgd(pgd_offset_k(start), mk_kernel_pgd(pud_phys));
        }
 
-       printk("kernel direct mapping tables upto %lx @ %lx-%lx\n",
-              __pa(end), table_start<<PAGE_SHIFT, start_pfn<<PAGE_SHIFT);
-
-       BUG_ON(start_pfn != (table_start + (tables_space >> PAGE_SHIFT)));
+       BUG_ON(!after_bootmem && start_pfn != table_start + (tables_space >> PAGE_SHIFT));
 
        __flush_tlb_all();
 }
@@ -696,6 +753,9 @@ size_zones(unsigned long *z, unsigned long *h,
 void __init paging_init(void)
 {
        unsigned long zones[MAX_NR_ZONES], holes[MAX_NR_ZONES];
+
+       memory_present(0, 0, end_pfn);
+       sparse_init();
        size_zones(zones, holes, 0, end_pfn);
        free_area_init_node(0, NODE_DATA(0), zones,
                            __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
@@ -757,6 +817,50 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size)
        __flush_tlb_all();
 } 
 
+/*
+ * Memory hotplug specific functions
+ * These are only for non-NUMA machines right now.
+ */
+#ifdef CONFIG_MEMORY_HOTPLUG
+
+void online_page(struct page *page)
+{
+       ClearPageReserved(page);
+       set_page_count(page, 1);
+       __free_page(page);
+       totalram_pages++;
+       num_physpages++;
+}
+
+int add_memory(u64 start, u64 size)
+{
+       struct pglist_data *pgdat = NODE_DATA(0);
+       struct zone *zone = pgdat->node_zones + MAX_NR_ZONES-2;
+       unsigned long start_pfn = start >> PAGE_SHIFT;
+       unsigned long nr_pages = size >> PAGE_SHIFT;
+       int ret;
+
+       ret = __add_pages(zone, start_pfn, nr_pages);
+       if (ret)
+               goto error;
+
+       init_memory_mapping(start, (start + size -1));
+
+       return ret;
+error:
+       printk("%s: Problem encountered in __add_pages!\n", __func__);
+       return ret;
+}
+EXPORT_SYMBOL_GPL(add_memory);
+
+int remove_memory(u64 start, u64 size)
+{
+       return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(remove_memory);
+
+#endif
+
 static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
                         kcore_vsyscall;
 
@@ -772,6 +876,7 @@ void __init mem_init(void)
 #if defined(CONFIG_SWIOTLB)
        swiotlb_init(); 
 #endif
+       no_iommu_init();
 
        /* How many end-of-memory variables you have, grandma! */
        max_low_pfn = end_pfn;
@@ -857,10 +962,33 @@ void free_initmem(void)
 #endif
 }
 
+#ifdef CONFIG_DEBUG_RODATA
+
+extern char __start_rodata, __end_rodata;
+void mark_rodata_ro(void)
+{
+       unsigned long addr = (unsigned long)&__start_rodata;
+
+       for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+               change_page_attr_addr(addr, 1, PAGE_KERNEL_RO);
+
+       printk ("Write protecting the kernel read-only data: %luk\n",
+                       (&__end_rodata - &__start_rodata) >> 10);
+
+       /*
+        * change_page_attr_addr() requires a global_flush_tlb() call after it.
+        * We do this after the printk so that if something went wrong in the
+        * change, the printk gets out at least to give a better debug hint
+        * of who is the culprit.
+        */
+       global_flush_tlb();
+}
+#endif
+
 #ifdef CONFIG_BLK_DEV_INITRD
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
-       if (start < (unsigned long)&_end)
+       if (start >= end)
                return;
        printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
        for (; start < end; start += PAGE_SIZE) {
@@ -900,7 +1028,7 @@ int kern_addr_valid(unsigned long addr)
        if (pgd_none(*pgd))
                return 0;
 
-       pud = pud_offset_k(addr);
+       pud = pud_offset_k(pgd, addr);
        if (pud_none(*pud))
                return 0; 
 
index 27fefec82ab6f5e91fec15c1b2c6e455bb9a579c..dacbeb23ee4122eb046676e65fce44c72b453dc9 100644 (file)
@@ -266,6 +266,7 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
        pte_t *kpte; 
        struct page *kpte_page;
        unsigned kpte_flags;
+       pgprot_t ref_prot2;
        kpte = lookup_address(address);
        if (!kpte) return 0;
        kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
@@ -278,10 +279,14 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot,
                         * split_large_page will take the reference for this change_page_attr
                         * on the split page.
                         */
-                       struct page *split = split_large_page(address, prot, ref_prot); 
+
+                       struct page *split;
+                       ref_prot2 = __pgprot(pgprot_val(pte_pgprot(*lookup_address(address))) & ~(1<<_PAGE_BIT_PSE));
+
+                       split = split_large_page(address, prot, ref_prot2);
                        if (!split)
                                return -ENOMEM;
-                       set_pte(kpte,mk_pte(split, ref_prot));
+                       set_pte(kpte,mk_pte(split, ref_prot2));
                        kpte_page = split;
                }       
                get_page(kpte_page);
index 42bfd9bcd778f3d52d9dcb6e849f5a309701cc76..6a9851b8993f1ea1ef415d23227df13bdee9fe0b 100644 (file)
@@ -54,6 +54,8 @@ source "drivers/char/Kconfig"
 
 source "drivers/i2c/Kconfig"
 
+source "drivers/spi/Kconfig"
+
 source "drivers/w1/Kconfig"
 
 source "drivers/hwmon/Kconfig"
@@ -77,4 +79,6 @@ endif
 
 source "drivers/sn/Kconfig"
 
+source "drivers/edac/Kconfig"
+
 endmenu
index e4c0be1d3fd303509a8f8eb0b4e8ce323f58e053..865d2f7d1a2b9b87541ba330d1b22a5caefe8f53 100644 (file)
@@ -13,6 +13,7 @@ obj-$(CONFIG_ACPI)            += acpi/
 # PnP must come after ACPI since it will eventually need to check if acpi
 # was used and do nothing if so
 obj-$(CONFIG_PNP)              += pnp/
+obj-$(CONFIG_ARM_AMBA)         += amba/
 
 # char/ comes before serial/ etc so that the VT console is the boot-time
 # default.
@@ -41,6 +42,7 @@ obj-$(CONFIG_FUSION)          += message/
 obj-$(CONFIG_IEEE1394)         += ieee1394/
 obj-y                          += cdrom/
 obj-$(CONFIG_MTD)              += mtd/
+obj-$(CONFIG_SPI)              += spi/
 obj-$(CONFIG_PCCARD)           += pcmcia/
 obj-$(CONFIG_DIO)              += dio/
 obj-$(CONFIG_SBUS)             += sbus/
@@ -62,6 +64,7 @@ obj-$(CONFIG_PHONE)           += telephony/
 obj-$(CONFIG_MD)               += md/
 obj-$(CONFIG_BT)               += bluetooth/
 obj-$(CONFIG_ISDN)             += isdn/
+obj-$(CONFIG_EDAC)             += edac/
 obj-$(CONFIG_MCA)              += mca/
 obj-$(CONFIG_EISA)             += eisa/
 obj-$(CONFIG_CPU_FREQ)         += cpufreq/
index cb31281eaa14965b74eabab5c4f57f59752a1a04..d47e28d0ad92924348a2c3963a32f8cf24a88e78 100644 (file)
@@ -168,7 +168,6 @@ config ACPI_NUMA
 config ACPI_ASUS
         tristate "ASUS/Medion Laptop Extras"
        depends on X86
-       default y
         ---help---
           This driver provides support for extra features of ACPI-compatible
           ASUS laptops. As some of Medion laptops are made by ASUS, it may also
@@ -209,7 +208,6 @@ config ACPI_IBM
 config ACPI_TOSHIBA
        tristate "Toshiba Laptop Extras"
        depends on X86
-       default y
        ---help---
          This driver adds support for access to certain system settings
          on "legacy free" Toshiba laptops.  These laptops can be recognized by
index 89d80076b305ff4d27f93a7c06ad28dd176cdfd2..a60095ae880914055aa87f72f976a85dd6787533 100644 (file)
@@ -37,7 +37,7 @@
 
 #define PREFIX                 "ACPI: "
 
-#define ACPI_MAX_TABLES                256
+#define ACPI_MAX_TABLES                128
 
 static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
        [ACPI_TABLE_UNKNOWN] = "????",
@@ -74,7 +74,7 @@ struct acpi_table_sdt {
 static unsigned long sdt_pa;   /* Physical Address */
 static unsigned long sdt_count;        /* Table count */
 
-static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES];
+static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata;
 
 void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr)
 {
index c298422b35889ebad28ef845ae7e2a326bb9065c..e65a3ef37a99b5bdb109c51665536f91a4fa529a 100644 (file)
@@ -101,6 +101,11 @@ static inline int valid_phys_addr_range(unsigned long addr, size_t *count)
 
        return 1;
 }
+
+static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t *size)
+{
+       return 1;
+}
 #endif
 
 #ifndef ARCH_HAS_DEV_MEM
@@ -230,26 +235,36 @@ static ssize_t write_mem(struct file * file, const char __user * buf,
 }
 #endif
 
+#ifndef __HAVE_PHYS_MEM_ACCESS_PROT
+static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
+                                    unsigned long size, pgprot_t vma_prot)
+{
+#ifdef pgprot_noncached
+       unsigned long offset = pfn << PAGE_SHIFT;
+
+       if (uncached_access(file, offset))
+               return pgprot_noncached(vma_prot);
+#endif
+       return vma_prot;
+}
+#endif
+
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
-#if defined(__HAVE_PHYS_MEM_ACCESS_PROT)
+       size_t size = vma->vm_end - vma->vm_start;
+
+       if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, &size))
+               return -EINVAL;
+
        vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
-                                                vma->vm_end - vma->vm_start,
+                                                size,
                                                 vma->vm_page_prot);
-#elif defined(pgprot_noncached)
-       unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
-       int uncached;
-
-       uncached = uncached_access(file, offset);
-       if (uncached)
-               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-#endif
 
        /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */
        if (remap_pfn_range(vma,
                            vma->vm_start,
                            vma->vm_pgoff,
-                           vma->vm_end-vma->vm_start,
+                           size,
                            vma->vm_page_prot))
                return -EAGAIN;
        return 0;
@@ -521,7 +536,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
        return virtr + wrote;
 }
 
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static ssize_t read_port(struct file * file, char __user * buf,
                         size_t count, loff_t *ppos)
 {
@@ -728,7 +743,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
 {
        loff_t ret;
 
-       down(&file->f_dentry->d_inode->i_sem);
+       mutex_lock(&file->f_dentry->d_inode->i_mutex);
        switch (orig) {
                case 0:
                        file->f_pos = offset;
@@ -743,7 +758,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
                default:
                        ret = -EINVAL;
        }
-       up(&file->f_dentry->d_inode->i_sem);
+       mutex_unlock(&file->f_dentry->d_inode->i_mutex);
        return ret;
 }
 
@@ -786,7 +801,7 @@ static struct file_operations null_fops = {
        .write          = write_null,
 };
 
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static struct file_operations port_fops = {
        .llseek         = memory_lseek,
        .read           = read_port,
@@ -823,7 +838,7 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf,
                          size_t count, loff_t *ppos)
 {
        char *tmp;
-       int ret;
+       ssize_t ret;
 
        tmp = kmalloc(count + 1, GFP_KERNEL);
        if (tmp == NULL)
@@ -832,6 +847,9 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf,
        if (!copy_from_user(tmp, buf, count)) {
                tmp[count] = 0;
                ret = printk("%s", tmp);
+               if (ret > count)
+                       /* printk can add a prefix */
+                       ret = count;
        }
        kfree(tmp);
        return ret;
@@ -853,7 +871,7 @@ static int memory_open(struct inode * inode, struct file * filp)
                case 3:
                        filp->f_op = &null_fops;
                        break;
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
                case 4:
                        filp->f_op = &port_fops;
                        break;
@@ -900,7 +918,7 @@ static const struct {
        {1, "mem",     S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
        {2, "kmem",    S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
        {3, "null",    S_IRUGO | S_IWUGO,           &null_fops},
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
        {4, "port",    S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
 #endif
        {5, "zero",    S_IRUGO | S_IWUGO,           &zero_fops},
index 13cda2fa1e49b1de6a45874979e872192d3b16d3..f26679948c984524551ea86f66b81c6aad89dad5 100644 (file)
@@ -2,6 +2,9 @@
 # Makefile for the kernel tpm device drivers.
 #
 obj-$(CONFIG_TCG_TPM) += tpm.o
+ifdef CONFIG_ACPI
+       obj-$(CONFIG_TCG_TPM) += tpm_bios.o
+endif
 obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
 obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
 obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
index 53018cbde1afe785573c6782b54c1639cb26e029..33e20abf894a9626aa9720b4c7243e731471c676 100644 (file)
@@ -438,6 +438,7 @@ ssize_t tpm_read(struct file * file, char __user *buf,
        int ret_size;
        int pos, pending = 0;
 
+       del_singleshot_timer_sync(&chip->user_read_timer);
        flush_scheduled_work();
        ret_size = atomic_read(&chip->data_pending);
        if (ret_size > 0) {     /* relay data */
@@ -488,6 +489,7 @@ void tpm_remove_hardware(struct device *dev)
        kfree(chip->vendor->miscdev.name);
 
        sysfs_remove_group(&dev->kobj, chip->vendor->attr_group);
+       tpm_bios_log_teardown(chip->bios_dir);
 
        dev_mask[chip->dev_num / TPM_NUM_MASK_ENTRIES ] &=
                ~(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES));
@@ -621,6 +623,8 @@ dev_num_search_complete:
 
        sysfs_create_group(&dev->kobj, chip->vendor->attr_group);
 
+       chip->bios_dir = tpm_bios_log_setup(devname);
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(tpm_register_hardware);
index 2b3b9728fdc5d267262b46da6b8255cafc22c5c2..5ad38c7c93d0a9f1601fcdef67891daf36d86bd7 100644 (file)
@@ -81,6 +81,8 @@ struct tpm_chip {
 
        struct tpm_vendor_specific *vendor;
 
+       struct dentry **bios_dir;
+
        struct list_head list;
 };
 
@@ -106,3 +108,16 @@ extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *);
 extern void tpm_remove_hardware(struct device *);
 extern int tpm_pm_suspend(struct pci_dev *, pm_message_t);
 extern int tpm_pm_resume(struct pci_dev *);
+
+#ifdef CONFIG_ACPI
+extern struct dentry ** tpm_bios_log_setup(char *);
+extern void tpm_bios_log_teardown(struct dentry **);
+#else
+static inline struct dentry* tpm_bios_log_setup(char *name)
+{
+       return NULL;
+}
+static inline void tpm_bios_log_teardown(struct dentry **dir)
+{
+}
+#endif
index c9c9085204d674258d29662b0042c75b51fa9c7e..81a630d0e6a74b1d0d3136fb6fc22ac37c85c9b3 100644 (file)
@@ -168,9 +168,12 @@ static struct tty_struct *alloc_tty_struct(void)
        return tty;
 }
 
+static void tty_buffer_free_all(struct tty_struct *);
+
 static inline void free_tty_struct(struct tty_struct *tty)
 {
        kfree(tty->write_buf);
+       tty_buffer_free_all(tty);
        kfree(tty);
 }
 
@@ -232,6 +235,200 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
        return 0;
 }
 
+/*
+ * Tty buffer allocation management
+ */
+
+static void tty_buffer_free_all(struct tty_struct *tty)
+{
+       struct tty_buffer *thead;
+       while((thead = tty->buf.head) != NULL) {
+               tty->buf.head = thead->next;
+               kfree(thead);
+       }
+       while((thead = tty->buf.free) != NULL) {
+               tty->buf.free = thead->next;
+               kfree(thead);
+       }
+       tty->buf.tail = NULL;
+}
+
+static void tty_buffer_init(struct tty_struct *tty)
+{
+       tty->buf.head = NULL;
+       tty->buf.tail = NULL;
+       tty->buf.free = NULL;
+}
+
+static struct tty_buffer *tty_buffer_alloc(size_t size)
+{
+       struct tty_buffer *p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC);
+       if(p == NULL)
+               return NULL;
+       p->used = 0;
+       p->size = size;
+       p->next = NULL;
+       p->char_buf_ptr = (char *)(p->data);
+       p->flag_buf_ptr = (unsigned char *)p->char_buf_ptr + size;
+/*     printk("Flip create %p\n", p); */
+       return p;
+}
+
+/* Must be called with the tty_read lock held. This needs to acquire strategy
+   code to decide if we should kfree or relink a given expired buffer */
+
+static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b)
+{
+       /* Dumb strategy for now - should keep some stats */
+/*     printk("Flip dispose %p\n", b); */
+       if(b->size >= 512)
+               kfree(b);
+       else {
+               b->next = tty->buf.free;
+               tty->buf.free = b;
+       }
+}
+
+static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size)
+{
+       struct tty_buffer **tbh = &tty->buf.free;
+       while((*tbh) != NULL) {
+               struct tty_buffer *t = *tbh;
+               if(t->size >= size) {
+                       *tbh = t->next;
+                       t->next = NULL;
+                       t->used = 0;
+                       /* DEBUG ONLY */
+                       memset(t->data, '*', size);
+/*                     printk("Flip recycle %p\n", t); */
+                       return t;
+               }
+               tbh = &((*tbh)->next);
+       }
+       /* Round the buffer size out */
+       size = (size + 0xFF) & ~ 0xFF;
+       return tty_buffer_alloc(size);
+       /* Should possibly check if this fails for the largest buffer we
+          have queued and recycle that ? */
+}
+
+int tty_buffer_request_room(struct tty_struct *tty, size_t size)
+{
+       struct tty_buffer *b = tty->buf.tail, *n;
+       int left = 0;
+
+       /* OPTIMISATION: We could keep a per tty "zero" sized buffer to
+          remove this conditional if its worth it. This would be invisible
+          to the callers */
+       if(b != NULL)
+               left = b->size - b->used;
+       if(left >= size)
+               return size;
+       /* This is the slow path - looking for new buffers to use */
+       n = tty_buffer_find(tty, size);
+       if(n == NULL)
+               return left;
+       if(b != NULL)
+               b->next = n;
+       else
+               tty->buf.head = n;
+       tty->buf.tail = n;
+       return size;
+}
+
+EXPORT_SYMBOL_GPL(tty_buffer_request_room);
+
+int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, size_t size)
+{
+       int copied = 0;
+       do {
+               int space = tty_buffer_request_room(tty, size - copied);
+               struct tty_buffer *tb = tty->buf.tail;
+               /* If there is no space then tb may be NULL */
+               if(unlikely(space == 0))
+                       break;
+               memcpy(tb->char_buf_ptr + tb->used, chars, space);
+               memset(tb->flag_buf_ptr + tb->used, TTY_NORMAL, space);
+               tb->used += space;
+               copied += space;
+               chars += space;
+/*             printk("Flip insert %d.\n", space); */
+       }
+       /* There is a small chance that we need to split the data over
+          several buffers. If this is the case we must loop */
+       while (unlikely(size > copied));
+       return copied;
+}
+
+EXPORT_SYMBOL_GPL(tty_insert_flip_string);
+
+int tty_insert_flip_string_flags(struct tty_struct *tty, unsigned char *chars, char *flags, size_t size)
+{
+       int copied = 0;
+       do {
+               int space = tty_buffer_request_room(tty, size - copied);
+               struct tty_buffer *tb = tty->buf.tail;
+               /* If there is no space then tb may be NULL */
+               if(unlikely(space == 0))
+                       break;
+               memcpy(tb->char_buf_ptr + tb->used, chars, space);
+               memcpy(tb->flag_buf_ptr + tb->used, flags, space);
+               tb->used += space;
+               copied += space;
+               chars += space;
+               flags += space;
+       }
+       /* There is a small chance that we need to split the data over
+          several buffers. If this is the case we must loop */
+       while (unlikely(size > copied));
+       return copied;
+}
+
+EXPORT_SYMBOL_GPL(tty_insert_flip_string_flags);
+
+
+/*
+ *     Prepare a block of space in the buffer for data. Returns the length
+ *     available and buffer pointer to the space which is now allocated and
+ *     accounted for as ready for normal characters. This is used for drivers
+ *     that need their own block copy routines into the buffer. There is no
+ *     guarantee the buffer is a DMA target!
+ */
+
+int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size)
+{
+       int space = tty_buffer_request_room(tty, size);
+       struct tty_buffer *tb = tty->buf.tail;
+       *chars = tb->char_buf_ptr + tb->used;
+       memset(tb->flag_buf_ptr + tb->used, TTY_NORMAL, space);
+       tb->used += space;
+       return space;
+}
+
+EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
+
+/*
+ *     Prepare a block of space in the buffer for data. Returns the length
+ *     available and buffer pointer to the space which is now allocated and
+ *     accounted for as ready for characters. This is used for drivers
+ *     that need their own block copy routines into the buffer. There is no
+ *     guarantee the buffer is a DMA target!
+ */
+
+int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size)
+{
+       int space = tty_buffer_request_room(tty, size);
+       struct tty_buffer *tb = tty->buf.tail;
+       *chars = tb->char_buf_ptr + tb->used;
+       *flags = tb->flag_buf_ptr + tb->used;
+       tb->used += space;
+       return space;
+}
+
+EXPORT_SYMBOL_GPL(tty_prepare_flip_string_flags);
+
+
+
 /*
  *     This is probably overkill for real world processors but
  *     they are not on hot paths so a little discipline won't do 
@@ -494,6 +691,17 @@ restart:
        if (ld == NULL)
                return -EINVAL;
 
+       /*
+        *      No more input please, we are switching. The new ldisc
+        *      will update this value in the ldisc open function
+        */
+
+       tty->receive_room = 0;
+
+       /*
+        *      Problem: What do we do if this blocks ?
+        */
+
        tty_wait_until_sent(tty, 0);
 
        if (tty->ldisc.num == ldisc) {
@@ -562,9 +770,9 @@ restart:
         *      we say so later on.
         */
 
-       work = cancel_delayed_work(&tty->flip.work);
+       work = cancel_delayed_work(&tty->buf.work);
        /*
-        * Wait for ->hangup_work and ->flip.work handlers to terminate
+        * Wait for ->hangup_work and ->buf.work handlers to terminate
         */
         
        flush_scheduled_work();
@@ -618,7 +826,7 @@ restart:
        /* Restart it in case no characters kick it off. Safe if
           already running */
        if (work)
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
        return retval;
 }
 
@@ -1723,10 +1931,10 @@ static void release_dev(struct file * filp)
         */
        clear_bit(TTY_LDISC, &tty->flags);
        clear_bit(TTY_DONT_FLIP, &tty->flags);
-       cancel_delayed_work(&tty->flip.work);
+       cancel_delayed_work(&tty->buf.work);
 
        /*
-        * Wait for ->hangup_work and ->flip.work handlers to terminate
+        * Wait for ->hangup_work and ->buf.work handlers to terminate
         */
         
        flush_scheduled_work();
@@ -2520,17 +2728,15 @@ EXPORT_SYMBOL(do_SAK);
 
 /*
  * This routine is called out of the software interrupt to flush data
- * from the flip buffer to the line discipline. 
+ * from the buffer chain to the line discipline.
  */
  
 static void flush_to_ldisc(void *private_)
 {
        struct tty_struct *tty = (struct tty_struct *) private_;
-       unsigned char   *cp;
-       char            *fp;
-       int             count;
        unsigned long   flags;
        struct tty_ldisc *disc;
+       struct tty_buffer *tbuf;
 
        disc = tty_ldisc_ref(tty);
        if (disc == NULL)       /*  !TTY_LDISC */
@@ -2540,28 +2746,23 @@ static void flush_to_ldisc(void *private_)
                /*
                 * Do it after the next timer tick:
                 */
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
                goto out;
        }
        spin_lock_irqsave(&tty->read_lock, flags);
-       if (tty->flip.buf_num) {
-               cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
-               fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
-               tty->flip.buf_num = 0;
-               tty->flip.char_buf_ptr = tty->flip.char_buf;
-               tty->flip.flag_buf_ptr = tty->flip.flag_buf;
-       } else {
-               cp = tty->flip.char_buf;
-               fp = tty->flip.flag_buf;
-               tty->flip.buf_num = 1;
-               tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
-               tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
-       }
-       count = tty->flip.count;
-       tty->flip.count = 0;
+       while((tbuf = tty->buf.head) != NULL) {
+               tty->buf.head = tbuf->next;
+               if (tty->buf.head == NULL)
+                       tty->buf.tail = NULL;
+               spin_unlock_irqrestore(&tty->read_lock, flags);
+               /* printk("Process buffer %p for %d\n", tbuf, tbuf->used); */
+               disc->receive_buf(tty, tbuf->char_buf_ptr,
+                                      tbuf->flag_buf_ptr,
+                                      tbuf->used);
+               spin_lock_irqsave(&tty->read_lock, flags);
+               tty_buffer_free(tty, tbuf);
+       }
        spin_unlock_irqrestore(&tty->read_lock, flags);
-
-       disc->receive_buf(tty, cp, fp, count);
 out:
        tty_ldisc_deref(disc);
 }
@@ -2656,11 +2857,12 @@ void tty_flip_buffer_push(struct tty_struct *tty)
        if (tty->low_latency)
                flush_to_ldisc((void *) tty);
        else
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
 }
 
 EXPORT_SYMBOL(tty_flip_buffer_push);
 
+
 /*
  * This subroutine initializes a tty structure.
  */
@@ -2671,10 +2873,10 @@ static void initialize_tty_struct(struct tty_struct *tty)
        tty_ldisc_assign(tty, tty_ldisc_get(N_TTY));
        tty->pgrp = -1;
        tty->overrun_time = jiffies;
-       tty->flip.char_buf_ptr = tty->flip.char_buf;
-       tty->flip.flag_buf_ptr = tty->flip.flag_buf;
-       INIT_WORK(&tty->flip.work, flush_to_ldisc, tty);
-       init_MUTEX(&tty->flip.pty_sem);
+       tty->buf.head = tty->buf.tail = NULL;
+       tty_buffer_init(tty);
+       INIT_WORK(&tty->buf.work, flush_to_ldisc, tty);
+       init_MUTEX(&tty->buf.pty_sem);
        init_MUTEX(&tty->termios_sem);
        init_waitqueue_head(&tty->write_wait);
        init_waitqueue_head(&tty->read_wait);
index c6b8929988529931a13e423442399b647f5fcf24..d5efe22936c4d4f480c32a6a8a91c386cd2e1406 100644 (file)
@@ -96,6 +96,16 @@ config SERIAL_8250_NR_UARTS
          PCI enumeration and any ports that may be added at run-time
          via hot-plug, or any ISA multi-port serial cards.
 
+config SERIAL_8250_RUNTIME_UARTS
+       int "Number of 8250/16550 serial ports to register at runtime"
+       depends on SERIAL_8250
+       default "4"
+       help
+         Set this to the maximum number of serial ports you want
+         the kernel to register at boot time.  This can be overriden
+         with the module parameter "nr_uarts", or boot-time parameter
+         8250.nr_uarts
+
 config SERIAL_8250_EXTENDED
        bool "Extended 8250/16550 serial driver options"
        depends on SERIAL_8250
@@ -181,7 +191,6 @@ config SERIAL_8250_BOCA
          To compile this driver as a module, choose M here: the module
          will be called 8250_boca.
 
-
 config SERIAL_8250_HUB6
        tristate "Support Hub6 cards"
        depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
@@ -271,6 +280,40 @@ config SERIAL_AMBA_PL011_CONSOLE
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
+config SERIAL_AT91
+       bool "AT91RM9200 serial port support"
+       depends on ARM && ARCH_AT91RM9200
+       select SERIAL_CORE
+       help
+         This enables the driver for the on-chip UARTs of the AT91RM9200
+         processor.
+
+config SERIAL_AT91_CONSOLE
+       bool "Support for console on AT91RM9200 serial port"
+       depends on SERIAL_AT91=y
+       select SERIAL_CORE_CONSOLE
+       help
+         Say Y here if you wish to use a UART on the AT91RM9200 as the system
+         console (the system console is the device which receives all kernel
+         messages and warnings and which allows logins in single user mode).
+
+config SERIAL_AT91_TTYAT
+       bool "Install as device ttyAT0-4 instead of ttyS0-4"
+       depends on SERIAL_AT91=y
+       help
+         Say Y here if you wish to have the five internal AT91RM9200 UARTs
+         appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the
+         normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if
+         you also want other UARTs, such as external 8250/16C550 compatible
+         UARTs.
+         The ttySn nodes are legally reserved for the 8250 serial driver
+         but are often misused by other serial drivers.
+
+         To use this, you should create suitable ttyATn device nodes in
+         /dev/, and pass "console=ttyATn" to the kernel.
+
+         Say Y if you have an external 8250/16C550 UART.  If unsure, say N.
+
 config SERIAL_CLPS711X
        tristate "CLPS711X serial port support"
        depends on ARM && ARCH_CLPS711X
@@ -360,29 +403,6 @@ config SERIAL_21285_CONSOLE
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
-config SERIAL_UART00
-       bool "Excalibur serial port (uart00) support"
-       depends on ARM && ARCH_CAMELOT
-       select SERIAL_CORE
-       help
-         Say Y here if you want to use the hard logic uart on Excalibur. This
-         driver also supports soft logic implementations of this uart core.
-
-config SERIAL_UART00_CONSOLE
-       bool "Support for console on Excalibur serial port"
-       depends on SERIAL_UART00
-       select SERIAL_CORE_CONSOLE
-       help
-         Say Y here if you want to support a serial console on an Excalibur
-         hard logic uart or uart00 IP core.
-
-         Even if you say Y here, the currently visible virtual console
-         (/dev/tty0) will still be used as the system console by default, but
-         you can alter that using a kernel command line option such as
-         "console=ttyS1". (Try "man bootparam" or see the documentation of
-         your boot loader (lilo or loadlin) about how to pass options to the
-         kernel at boot time.)
-
 config SERIAL_MPSC
        bool "Marvell MPSC serial port support"
        depends on PPC32 && MV64X60
@@ -828,7 +848,7 @@ config SERIAL_M32R_SIO_CONSOLE
 
 config SERIAL_M32R_PLDSIO
        bool "M32R SIO I/F on a PLD"
-       depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT)
+       depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PLAT_USRV || PLAT_M32700UT)
        default n
        help
          Say Y here if you want to use the M32R serial controller
@@ -874,7 +894,7 @@ config SERIAL_VR41XX_CONSOLE
 
 config SERIAL_JSM
         tristate "Digi International NEO PCI Support"
-       depends on PCI
+       depends on PCI && BROKEN
         select SERIAL_CORE
         help
           This is a driver for Digi International's Neo series
@@ -897,4 +917,12 @@ config SERIAL_SGI_IOC4
                and wish to use the serial ports on this card, say Y.
                Otherwise, say N.
 
+config SERIAL_SGI_IOC3
+       tristate "SGI Altix IOC3 serial support"
+       depends on (IA64_GENERIC || IA64_SGI_SN2) && SGI_IOC3
+       select SERIAL_CORE
+       help
+         If you have an SGI Altix with an IOC3 serial card,
+         say Y or M.  Otherwise, say N.
+
 endmenu
index e4e7e5cad415c124b6d37d63a73e01fee843ff69..6a700871e9fdc9923ed5b68d41523c318155001e 100644 (file)
@@ -91,15 +91,13 @@ static void balloon_process(void *unused);
 static DECLARE_WORK(balloon_worker, balloon_process, NULL);
 static struct timer_list balloon_timer;
 
-/* Use the private and mapping fields of struct page as a list. */
-#define PAGE_TO_LIST(p) ((struct list_head *)&p->u.private)
-#define LIST_TO_PAGE(l)                                \
-       (list_entry(((unsigned long *)l), struct page, u.private))
+#define PAGE_TO_LIST(p) (&(p)->ballooned)
+#define LIST_TO_PAGE(l) list_entry((l), struct page, ballooned)
 #define UNLIST_PAGE(p)                         \
        do {                                    \
                list_del(PAGE_TO_LIST(p));      \
-               p->mapping = NULL;              \
-               p->u.private = 0;               \
+               PAGE_TO_LIST(p)->next = NULL;   \
+               PAGE_TO_LIST(p)->prev = NULL;   \
        } while(0)
 
 #define IPRINTK(fmt, args...) \
index da3791aca8c029ff0e5b60ae2bbf94d4ec8440c6..7cf316644fd33170235ddd58db2b1c7a8c93380b 100644 (file)
@@ -664,7 +664,8 @@ static irqreturn_t blkif_int(int irq, void *dev_id, struct pt_regs *ptregs)
                                req, (bret->status == BLKIF_RSP_OKAY),
                                req->hard_nr_sectors);
                        BUG_ON(ret);
-                       end_that_request_last(req);
+                       end_that_request_last(
+                               req, (bret->status == BLKIF_RSP_OKAY));
                        break;
                default:
                        BUG();
index dd2486ff100f2d3262051f8d61949d3c6839f442..14989e7043c31808b2a55b75465a333ccac1c4d8 100644 (file)
@@ -91,11 +91,13 @@ out:
 
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
+       size_t size = vma->vm_end - vma->vm_start;
+
        if (uncached_access(file))
                vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 
        if (direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
-                                  vma->vm_end - vma->vm_start,
+                                  size,
                                   vma->vm_page_prot, DOMID_IO))
                return -EAGAIN;
 
@@ -114,7 +116,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
 {
        loff_t ret;
 
-       down(&file->f_dentry->d_inode->i_sem);
+       mutex_lock(&file->f_dentry->d_inode->i_mutex);
        switch (orig) {
                case 0:
                        file->f_pos = offset;
@@ -129,7 +131,7 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig)
                default:
                        ret = -EINVAL;
        }
-       up(&file->f_dentry->d_inode->i_sem);
+       mutex_unlock(&file->f_dentry->d_inode->i_mutex);
        return ret;
 }
 
index eddc134506a53dd121a33b907a0802ddb86dcc20..5a38f6b1f6671a782e133e3d98acdd29ecb32c29 100644 (file)
@@ -188,7 +188,7 @@ void vcpu_prepare(int vcpu)
 
        ctxt.ctrlreg[3] = virt_to_mfn(init_level4_pgt) << PAGE_SHIFT;
 
-       ctxt.gs_base_kernel = (unsigned long)(cpu_pda + vcpu);
+       ctxt.gs_base_kernel = (unsigned long)(cpu_pda(vcpu));
 #endif
 
        BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt));
@@ -226,8 +226,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                        panic("failed fork for CPU %d", cpu);
 
 #ifdef __x86_64__
-               cpu_pda[cpu].pcurrent = idle;
-               cpu_pda[cpu].cpunumber = cpu;
+               cpu_pda(cpu)->pcurrent = idle;
+               cpu_pda(cpu)->cpunumber = cpu;
                per_cpu(init_tss,cpu).rsp0 = idle->thread.rsp;
                clear_ti_thread_flag(idle->thread_info, TIF_FORK);
 #endif
index 78f636a38d3a3bf8a233a704e42b3b44fb4f9f5b..64bebdb820759d820c037b5a41189655b62bbd1d 100644 (file)
@@ -112,15 +112,15 @@ fail:
  * and vif variables to the environment, for the benefit of the vif-* hotplug
  * scripts.
  */
-static int netback_hotplug(struct xenbus_device *xdev, char **envp,
-                          int num_envp, char *buffer, int buffer_size)
+static int netback_uevent(struct xenbus_device *xdev, char **envp,
+                         int num_envp, char *buffer, int buffer_size)
 {
        struct backend_info *be = xdev->data;
        netif_t *netif = be->netif;
        int i = 0, length = 0;
        char *val;
 
-       DPRINTK("netback_hotplug");
+       DPRINTK("netback_uevent");
 
        val = xenbus_read(XBT_NULL, xdev->nodename, "script", NULL);
        if (IS_ERR(val)) {
@@ -129,15 +129,13 @@ static int netback_hotplug(struct xenbus_device *xdev, char **envp,
                return err;
        }
        else {
-               add_hotplug_env_var(envp, num_envp, &i,
-                                   buffer, buffer_size, &length,
-                                   "script=%s", val);
+               add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
+                              &length, "script=%s", val);
                kfree(val);
        }
 
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "vif=%s", netif->dev->name);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "vif=%s", netif->dev->name);
 
        envp[i] = NULL;
 
@@ -183,7 +181,7 @@ static void backend_changed(struct xenbus_watch *watch,
                        return;
                }
 
-               kobject_hotplug(&dev->dev.kobj, KOBJ_ONLINE);
+               kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
 
                maybe_connect(be);
        }
@@ -216,7 +214,7 @@ static void frontend_changed(struct xenbus_device *dev,
                break;
 
        case XenbusStateClosed:
-               kobject_hotplug(&dev->dev.kobj, KOBJ_OFFLINE);
+               kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
                device_unregister(&dev->dev);
                break;
 
@@ -307,7 +305,7 @@ static struct xenbus_driver netback = {
        .ids = netback_ids,
        .probe = netback_probe,
        .remove = netback_remove,
-       .hotplug = netback_hotplug,
+       .uevent = netback_uevent,
        .otherend_changed = frontend_changed,
 };
 
index daa1600e0a8245f7ea3f901d69173a2ca22becf1..b1ed9453bfb76755699df35217b747864705ad2c 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/bitops.h>
 #include <linux/proc_fs.h>
 #include <linux/ethtool.h>
+#include <linux/in.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 #include <net/arp.h>
index 9a6025450b4dc01dbc76043cfeaf685a6483bfeb..14af1a512f0f52210a0bf3395ef048c2fd7494e0 100644 (file)
@@ -217,8 +217,8 @@ static int backend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename)
        return 0;
 }
 
-static int xenbus_hotplug_backend(struct device *dev, char **envp,
-                                 int num_envp, char *buffer, int buffer_size);
+static int xenbus_uevent_backend(struct device *dev, char **envp,
+                                int num_envp, char *buffer, int buffer_size);
 static int xenbus_probe_backend(const char *type, const char *domid);
 static struct xen_bus_type xenbus_backend = {
        .root = "backend",
@@ -228,15 +228,15 @@ static struct xen_bus_type xenbus_backend = {
        .bus = {
                .name  = "xen-backend",
                .match = xenbus_match,
-               .hotplug = xenbus_hotplug_backend,
+               .uevent = xenbus_uevent_backend,
        },
        .dev = {
                .bus_id = "xen-backend",
        },
 };
 
-static int xenbus_hotplug_backend(struct device *dev, char **envp,
-                                 int num_envp, char *buffer, int buffer_size)
+static int xenbus_uevent_backend(struct device *dev, char **envp,
+                                int num_envp, char *buffer, int buffer_size)
 {
        struct xenbus_device *xdev;
        struct xenbus_driver *drv;
@@ -253,17 +253,14 @@ static int xenbus_hotplug_backend(struct device *dev, char **envp,
                return -ENODEV;
 
        /* stuff we want to pass to /sbin/hotplug */
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_TYPE=%s", xdev->devicetype);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_TYPE=%s", xdev->devicetype);
 
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_PATH=%s", xdev->nodename);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_PATH=%s", xdev->nodename);
 
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_BASE_PATH=%s", xenbus_backend.root);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_BASE_PATH=%s", xenbus_backend.root);
 
        /* terminate, set to next free slot, shrink available space */
        envp[i] = NULL;
@@ -274,9 +271,9 @@ static int xenbus_hotplug_backend(struct device *dev, char **envp,
 
        if (dev->driver) {
                drv = to_xenbus_driver(dev->driver);
-               if (drv && drv->hotplug)
-                       return drv->hotplug(xdev, envp, num_envp, buffer,
-                                           buffer_size);
+               if (drv && drv->uevent)
+                       return drv->uevent(xdev, envp, num_envp, buffer,
+                                          buffer_size);
        }
 
        return 0;
index 425f883b1f576543da4131f9b0b5c93e39dc94fe..e1706b000ca41ea1aded88ba189d1ef859cfec78 100644 (file)
@@ -70,6 +70,7 @@ config FS_XIP
 
 config EXT3_FS
        tristate "Ext3 journalling file system support"
+       select JBD
        help
          This is the journaling version of the Second extended file system
          (often called ext3), the de facto standard Linux file system
@@ -138,23 +139,20 @@ config EXT3_FS_SECURITY
          extended attributes for file security labels, say N.
 
 config JBD
-# CONFIG_JBD could be its own option (even modular), but until there are
-# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
-# dep_tristate '  Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
        tristate
-       default EXT3_FS
        help
          This is a generic journaling layer for block devices.  It is
-         currently used by the ext3 file system, but it could also be used to
-         add journal support to other file systems or block devices such as
-         RAID or LVM.
+         currently used by the ext3 and OCFS2 file systems, but it could
+         also be used to add journal support to other file systems or block
+         devices such as RAID or LVM.
 
-         If you are using the ext3 file system, you need to say Y here. If
-         you are not using ext3 then you will probably want to say N.
+         If you are using the ext3 or OCFS2 file systems, you need to
+         say Y here. If you are not using ext3 OCFS2 then you will probably
+         want to say N.
 
          To compile this device as a module, choose M here: the module will be
-         called jbd.  If you are compiling ext3 into the kernel, you cannot
-         compile this code as a module.
+         called jbd.  If you are compiling ext3 or OCFS2 into the kernel,
+         you cannot compile this code as a module.
 
 config JBD_DEBUG
        bool "JBD (ext3) debugging support"
@@ -326,6 +324,38 @@ config FS_POSIX_ACL
 
 source "fs/xfs/Kconfig"
 
+config OCFS2_FS
+       tristate "OCFS2 file system support (EXPERIMENTAL)"
+       depends on NET && EXPERIMENTAL
+       select CONFIGFS_FS
+       select JBD
+       select CRC32
+       select INET
+       help
+         OCFS2 is a general purpose extent based shared disk cluster file
+         system with many similarities to ext3. It supports 64 bit inode
+         numbers, and has automatically extending metadata groups which may
+         also make it attractive for non-clustered use.
+
+         You'll want to install the ocfs2-tools package in order to at least
+         get "mount.ocfs2".
+
+         Project web page:    http://oss.oracle.com/projects/ocfs2
+         Tools web page:      http://oss.oracle.com/projects/ocfs2-tools
+         OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
+
+         Note: Features which OCFS2 does not support yet:
+                 - extended attributes
+                 - shared writeable mmap
+                 - loopback is supported, but data written will not
+                   be cluster coherent.
+                 - quotas
+                 - cluster aware flock
+                 - Directory change notification (F_NOTIFY)
+                 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
+                 - POSIX ACLs
+                 - readpages / writepages (not user visible)
+
 config MINIX_FS
        tristate "Minix fs support"
        help
@@ -768,7 +798,7 @@ config PROC_KCORE
 
 config PROC_VMCORE
         bool "/proc/vmcore support (EXPERIMENTAL)"
-        depends on PROC_FS && EMBEDDED && EXPERIMENTAL && CRASH_DUMP
+        depends on PROC_FS && EXPERIMENTAL && CRASH_DUMP
         help
         Exports the dump image of crashed kernel in ELF format.
 
@@ -842,6 +872,20 @@ config RELAYFS_FS
 
          If unsure, say N.
 
+config CONFIGFS_FS
+       tristate "Userspace-driven configuration filesystem (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+         configfs is a ram-based filesystem that provides the converse
+         of sysfs's functionality. Where sysfs is a filesystem-based
+         view of kernel objects, configfs is a filesystem-based manager
+         of kernel objects, or config_items.
+
+         Both sysfs and configfs can and should exist together on the
+         same system. One is not a replacement for the other.
+
+         If unsure, say N.
+
 endmenu
 
 menu "Miscellaneous filesystems"
index 0ee6d4aa76dc86859b5687d6e8270213b8e13db4..4a9e85d197b0d02432c02da74d34df85bd930aaa 100644 (file)
@@ -211,6 +211,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
 }
 
 #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 /**
  * atomic_add_unless - add unless the number is a given value
@@ -249,4 +250,5 @@ __asm__ __volatile__(LOCK "orl %0,%1" \
 #define smp_mb__before_atomic_inc()    barrier()
 #define smp_mb__after_atomic_inc()     barrier()
 
+#include <asm-generic/atomic.h>
 #endif
index edbbc031809c52d6bba683073cbc5f9a9e060e92..5f438be07d73f20fc826e7f808b0fa8b10b08945 100644 (file)
@@ -38,7 +38,7 @@ static inline void set_bit(int nr, volatile unsigned long * addr)
 {
        __asm__ __volatile__( LOCK
                "btsl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -55,7 +55,7 @@ static inline void __set_bit(int nr, volatile unsigned long * addr)
 {
        __asm__(
                "btsl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -73,7 +73,7 @@ static inline void clear_bit(int nr, volatile unsigned long * addr)
 {
        __asm__ __volatile__( LOCK
                "btrl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -81,7 +81,7 @@ static inline void __clear_bit(int nr, volatile unsigned long * addr)
 {
        __asm__ __volatile__(
                "btrl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 #define smp_mb__before_clear_bit()     barrier()
@@ -100,7 +100,7 @@ static inline void __change_bit(int nr, volatile unsigned long * addr)
 {
        __asm__ __volatile__(
                "btcl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -118,7 +118,7 @@ static inline void change_bit(int nr, volatile unsigned long * addr)
 {
        __asm__ __volatile__( LOCK
                "btcl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -137,7 +137,7 @@ static inline int test_and_set_bit(int nr, volatile unsigned long * addr)
 
        __asm__ __volatile__( LOCK
                "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -157,7 +157,7 @@ static inline int __test_and_set_bit(int nr, volatile unsigned long * addr)
 
        __asm__(
                "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr));
        return oldbit;
 }
@@ -177,7 +177,7 @@ static inline int test_and_clear_bit(int nr, volatile unsigned long * addr)
 
        __asm__ __volatile__( LOCK
                "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -197,7 +197,7 @@ static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
 
        __asm__(
                "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr));
        return oldbit;
 }
@@ -209,7 +209,7 @@ static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
 
        __asm__ __volatile__(
                "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -228,7 +228,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long* addr)
 
        __asm__ __volatile__( LOCK
                "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -242,7 +242,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long* addr)
 static int test_bit(int nr, const volatile void * addr);
 #endif
 
-static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
+static __always_inline int constant_test_bit(int nr, const volatile unsigned long *addr)
 {
        return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
 }
@@ -327,9 +327,9 @@ static inline unsigned long __ffs(unsigned long word)
  * Returns the bit-number of the first set bit, not the number of the byte
  * containing a bit.
  */
-static inline int find_first_bit(const unsigned long *addr, unsigned size)
+static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
 {
-       int x = 0;
+       unsigned x = 0;
 
        while (x < size) {
                unsigned long val = *addr++;
@@ -362,11 +362,7 @@ static inline unsigned long ffz(unsigned long word)
        return word;
 }
 
-/*
- * fls: find last bit set.
- */
-
-#define fls(x) generic_fls(x)
+#define fls64(x)   generic_fls64(x)
 
 #ifdef __KERNEL__
 
@@ -408,6 +404,23 @@ static inline int ffs(int x)
        return r+1;
 }
 
+/**
+ * fls - find last bit set
+ * @x: the word to search
+ *
+ * This is defined the same way as ffs.
+ */
+static inline int fls(int x)
+{
+       int r;
+
+       __asm__("bsrl %1,%0\n\t"
+               "jnz 1f\n\t"
+               "movl $-1,%0\n"
+               "1:" : "=r" (r) : "rm" (x));
+       return r+1;
+}
+
 /**
  * hweightN - returns the hamming weight of a N-bit word
  * @x: the word to weigh
index 4e0b278eb534851441c7153a35482923258d0d65..24c9fd31da07f065ba0417c19837518c935115d0 100644 (file)
@@ -61,7 +61,7 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
        if (op == FUTEX_OP_SET)
                __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
        else {
-#if !defined(CONFIG_X86_BSWAP) && !defined(CONFIG_UML)
+#ifndef CONFIG_X86_BSWAP
                if (boot_cpu_data.x86 == 3)
                        ret = -ENOSYS;
                else
index 88ea076b1fdfb15671a6f9824e6a8791fa9006c7..d7b2306c5ff204c463418f1598b1ab8f8d385e89 100644 (file)
@@ -15,8 +15,6 @@
 
 extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
 
-#define get_cpu_gdt_table(_cpu) ((struct desc_struct *)cpu_gdt_descr[(_cpu)].address)
-
 DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
 
 struct Xgt_desc_struct {
@@ -27,6 +25,11 @@ struct Xgt_desc_struct {
 
 extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
 
+static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
+{
+       return ((struct desc_struct *)cpu_gdt_descr[cpu].address);
+}
+
 #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))
 #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8))
 
index 7bddeda9000f07d79cc94d1a9b7835dbf82b196e..7780978670b0a510c49e727ab09a88e8d60afa75 100644 (file)
@@ -126,7 +126,7 @@ dma_get_cache_alignment(void)
 {
        /* no easy way to get cache size on all x86, so return the
         * maximum possible, to be safe */
-       return (1 << L1_CACHE_SHIFT_MAX);
+       return (1 << INTERNODE_CACHE_SHIFT);
 }
 #else
 extern int dma_get_cache_alignment(void);
index eafb778df5636ed30dfefe38cdef73f3d598cb0f..d3affe0d9541c91a4c43c5746114ac07f951ab19 100644 (file)
@@ -143,6 +143,11 @@ extern void iounmap(volatile void __iomem *addr);
 extern void *bt_ioremap(unsigned long offset, unsigned long size);
 extern void bt_iounmap(void *addr, unsigned long size);
 
+/* Use early IO mappings for DMI because it's initialized early */
+#define dmi_ioremap bt_ioremap
+#define dmi_iounmap bt_iounmap
+#define dmi_alloc alloc_bootmem
+
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
index 04bd9e74d0ee18a65bcbc996ed8d3911dd91e92a..2b78658f1bead492c077ff2a82b49faaff4945fb 100644 (file)
@@ -62,9 +62,11 @@ struct cpuinfo_x86 {
        int     x86_cache_size;  /* in KB - valid for CPUS which support this
                                    call  */
        int     x86_cache_alignment;    /* In bytes */
-       int     fdiv_bug;
-       int     f00f_bug;
-       int     coma_bug;
+       char    fdiv_bug;
+       char    f00f_bug;
+       char    coma_bug;
+       char    pad0;
+       int     x86_power;
        unsigned long loops_per_jiffy;
        unsigned char x86_max_cores;    /* cpuid returned max cores value */
        unsigned char booted_cores;     /* number of cores as seen by OS */
@@ -289,9 +291,11 @@ static inline void clear_in_cr4 (unsigned long mask)
        outb((data), 0x23); \
 } while (0)
 
-static inline void serialize_cpu(void)
+/* Stop speculative execution */
+static inline void sync_core(void)
 {
-        __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
+       int tmp;
+       asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory");
 }
 
 static inline void __monitor(const void *eax, unsigned long ecx,
@@ -562,10 +566,20 @@ unsigned long get_wchan(struct task_struct *p);
        (unsigned long)(&__ptr[THREAD_SIZE_LONGS]);                     \
 })
 
+/*
+ * The below -8 is to reserve 8 bytes on top of the ring0 stack.
+ * This is necessary to guarantee that the entire "struct pt_regs"
+ * is accessable even if the CPU haven't stored the SS/ESP registers
+ * on the stack (interrupt gate does not save these registers
+ * when switching to the same priv ring).
+ * Therefore beware: accessing the xss/esp fields of the
+ * "struct pt_regs" is possible, but they may contain the
+ * completely wrong values.
+ */
 #define task_pt_regs(task)                                             \
 ({                                                                     \
        struct pt_regs *__regs__;                                       \
-       __regs__ = (struct pt_regs *)KSTK_TOP((task)->thread_info);     \
+       __regs__ = (struct pt_regs *)(KSTK_TOP(task_stack_page(task))-8); \
        __regs__ - 1;                                                   \
 })
 
index ef3d885cf16680663b7163dbd9040f938e1f7971..8b95045e4edb4849a7160d1bba21d10a437fe255 100644 (file)
@@ -54,6 +54,9 @@ struct pt_regs {
 #define PTRACE_GET_THREAD_AREA    25
 #define PTRACE_SET_THREAD_AREA    26
 
+#define PTRACE_SYSEMU            31
+#define PTRACE_SYSEMU_SINGLESTEP  32
+
 #ifdef __KERNEL__
 
 #include <asm/vm86.h>
index 95edad964cea85fd3f00aeb0f7f22db47d218a6f..cb114d5dc74d0cc42c8af45221d450c93412d0eb 100644 (file)
 
 #define __BOOT_DS      FLAT_KERNEL_DS
 
+/* The PnP BIOS entries in the GDT */
+#define GDT_ENTRY_PNPBIOS_CS32         (GDT_ENTRY_PNPBIOS_BASE + 0)
+#define GDT_ENTRY_PNPBIOS_CS16         (GDT_ENTRY_PNPBIOS_BASE + 1)
+#define GDT_ENTRY_PNPBIOS_DS           (GDT_ENTRY_PNPBIOS_BASE + 2)
+#define GDT_ENTRY_PNPBIOS_TS1          (GDT_ENTRY_PNPBIOS_BASE + 3)
+#define GDT_ENTRY_PNPBIOS_TS2          (GDT_ENTRY_PNPBIOS_BASE + 4)
+
+/* The PnP BIOS selectors */
+#define PNP_CS32   (GDT_ENTRY_PNPBIOS_CS32 * 8)        /* segment for calling fn */
+#define PNP_CS16   (GDT_ENTRY_PNPBIOS_CS16 * 8)        /* code segment for BIOS */
+#define PNP_DS     (GDT_ENTRY_PNPBIOS_DS * 8)  /* data segment for BIOS */
+#define PNP_TS1    (GDT_ENTRY_PNPBIOS_TS1 * 8) /* transfer data segment */
+#define PNP_TS2    (GDT_ENTRY_PNPBIOS_TS2 * 8) /* another data segment */
+
 /*
  * The interrupt descriptor table has room for 256 idt's,
  * the global descriptor table is dependent on the number
index 11f88c2507e74d276c181cbf1015e03400f34ea8..c6eb88bc74b9a19ec69256559447db1158d2a45c 100644 (file)
@@ -15,21 +15,21 @@ static __inline__ void synch_set_bit(int nr, volatile void * addr)
 {
     __asm__ __volatile__ ( 
         "lock btsl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ void synch_clear_bit(int nr, volatile void * addr)
 {
     __asm__ __volatile__ (
         "lock btrl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ void synch_change_bit(int nr, volatile void * addr)
 {
     __asm__ __volatile__ (
         "lock btcl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ int synch_test_and_set_bit(int nr, volatile void * addr)
@@ -37,7 +37,7 @@ static __inline__ int synch_test_and_set_bit(int nr, volatile void * addr)
     int oldbit;
     __asm__ __volatile__ (
         "lock btsl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -46,7 +46,7 @@ static __inline__ int synch_test_and_clear_bit(int nr, volatile void * addr)
     int oldbit;
     __asm__ __volatile__ (
         "lock btrl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -56,7 +56,7 @@ static __inline__ int synch_test_and_change_bit(int nr, volatile void * addr)
 
     __asm__ __volatile__ (
         "lock btcl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -85,7 +85,7 @@ static inline unsigned long __synch_cmpxchg(volatile void *ptr,
        case 2:
                __asm__ __volatile__("lock; cmpxchgw %w1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -93,14 +93,14 @@ static inline unsigned long __synch_cmpxchg(volatile void *ptr,
        case 4:
                __asm__ __volatile__("lock; cmpxchgl %k1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
        case 8:
                __asm__ __volatile__("lock; cmpxchgq %1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -108,7 +108,7 @@ static inline unsigned long __synch_cmpxchg(volatile void *ptr,
        case 4:
                __asm__ __volatile__("lock; cmpxchgl %1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -117,7 +117,8 @@ static inline unsigned long __synch_cmpxchg(volatile void *ptr,
        return old;
 }
 
-static __inline__ int synch_const_test_bit(int nr, const volatile void * addr)
+static __always_inline int synch_const_test_bit(int nr,
+                                               const volatile void * addr)
 {
     return ((1UL << (nr & 31)) & 
             (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
index 9be3d06efbfebb4121b2d8949aa14e2bfbdad9dd..0c0dc515a2e0bd2628adbec8c86c6f1bdf9950a1 100644 (file)
@@ -63,23 +63,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
         ); } while(0)
 
 #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) )
-#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1)>>12 )
-
-static inline unsigned long _get_base(char * addr)
-{
-       unsigned long __base;
-       __asm__("movb %3,%%dh\n\t"
-               "movb %2,%%dl\n\t"
-               "shll $16,%%edx\n\t"
-               "movw %1,%%dx"
-               :"=&d" (__base)
-               :"m" (*((addr)+2)),
-                "m" (*((addr)+4)),
-                "m" (*((addr)+7)));
-       return __base;
-}
-
-#define get_base(ldt) _get_base( ((char *)&(ldt)) )
+#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1) )
 
 /*
  * Load a segment. Fall back on loading the zero
@@ -146,6 +130,19 @@ static inline unsigned long _get_base(char * addr)
                :"=r" (__dummy)); \
        __dummy; \
 })
+
+#define read_cr4_safe() ({                           \
+       unsigned int __dummy;                         \
+       /* This could fault if %cr4 does not exist */ \
+       __asm__("1: movl %%cr4, %0              \n"   \
+               "2:                             \n"   \
+               ".section __ex_table,\"a\"      \n"   \
+               ".long 1b,2b                    \n"   \
+               ".previous                      \n"   \
+               : "=r" (__dummy): "0" (0));           \
+       __dummy;                                      \
+})
+
 #define write_cr4(x) \
        __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
 #define stts() (HYPERVISOR_fpu_taskswitch(1))
@@ -668,6 +665,15 @@ void enable_hlt(void);
 extern int es7000_plat;
 void cpu_idle_wait(void);
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible:
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 extern unsigned long arch_align_stack(unsigned long sp);
 
 #endif
index f27a87b2146990c52ae748b09c9936bab579eb63..0e86bc5259571f0cec9313d5f12243a7c1990e17 100644 (file)
@@ -54,23 +54,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
         ); } while(0)
 
 #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) )
-#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1)>>12 )
-
-static inline unsigned long _get_base(char * addr)
-{
-       unsigned long __base;
-       __asm__("movb %3,%%dh\n\t"
-               "movb %2,%%dl\n\t"
-               "shll $16,%%edx\n\t"
-               "movw %1,%%dx"
-               :"=&d" (__base)
-               :"m" (*((addr)+2)),
-                "m" (*((addr)+4)),
-                "m" (*((addr)+7)));
-       return __base;
-}
-
-#define get_base(ldt) _get_base( ((char *)&(ldt)) )
+#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1) )
 
 /*
  * Load a segment. Fall back on loading the zero
@@ -140,6 +124,19 @@ static inline unsigned long _get_base(char * addr)
                :"=r" (__dummy)); \
        __dummy; \
 })
+
+#define read_cr4_safe() ({                           \
+       unsigned int __dummy;                         \
+       /* This could fault if %cr4 does not exist */ \
+       __asm__("1: movl %%cr4, %0              \n"   \
+               "2:                             \n"   \
+               ".section __ex_table,\"a\"      \n"   \
+               ".long 1b,2b                    \n"   \
+               ".previous                      \n"   \
+               : "=r" (__dummy): "0" (0));           \
+       __dummy;                                      \
+})
+
 #define write_cr4(x) \
        __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
 #define stts() write_cr0(8 | read_cr0())
@@ -595,6 +592,15 @@ void enable_hlt(void);
 extern int es7000_plat;
 void cpu_idle_wait(void);
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible:
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 extern unsigned long arch_align_stack(unsigned long sp);
 
 #endif
index d4646fcde24bb1ae72aa970b0ca088f680f15d46..e1bcb49913a45a3ef613dabf211c180ba57ed13a 100644 (file)
@@ -30,8 +30,8 @@
 #ifndef __HYPERCALL_H__
 #define __HYPERCALL_H__
 
-#include <xen/interface/xen.h>
-#include <xen/interface/sched.h>
+#include <asm-xen/xen-public/xen.h>
+#include <asm-xen/xen-public/sched.h>
 
 /* FIXME: temp place to hold these page related macros */
 #include <asm/page.h>
index 4771111e0d58e32ade99e844983cf150986f852c..494bd5bbde3b3ed0386df015e774510786c49743 100644 (file)
@@ -34,8 +34,8 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/version.h>
-#include <xen/interface/xen.h>
-#include <xen/interface/dom0_ops.h>
+#include <asm-xen/xen-public/xen.h>
+#include <asm-xen/xen-public/dom0_ops.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
 
index 5a0382e103856c93056a5e4194e14085e7688c51..d7c68961892fc044291be47a99c0313c0e84883b 100644 (file)
@@ -75,8 +75,6 @@
 #define PAL_CACHE_READ         259     /* read tag & data of cacheline for diagnostic testing */
 #define PAL_CACHE_WRITE                260     /* write tag & data of cacheline for diagnostic testing */
 #define PAL_VM_TR_READ         261     /* read contents of translation register */
-#define PAL_GET_PSTATE         262     /* get the current P-state */
-#define PAL_SET_PSTATE         263     /* set the P-state */
 
 #ifndef __ASSEMBLY__
 
@@ -1114,25 +1112,6 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)
        return iprv.status;
 }
 
-/* Get the current P-state information */
-static inline s64
-ia64_pal_get_pstate (u64 *pstate_index)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0);
-       *pstate_index = iprv.v0;
-       return iprv.status;
-}
-
-/* Set the P-state */
-static inline s64
-ia64_pal_set_pstate (u64 pstate_index)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_STK(iprv, PAL_SET_PSTATE, pstate_index, 0, 0);
-       return iprv.status;
-}
-
 /* Cause the processor to enter LIGHT HALT state, where prefetching and execution are
  * suspended, but cache and TLB coherency is maintained.
  */
index e73dc84f7b1e04ae68a270fc19aebeb5cd904283..b8c9e667927c4a8d620a846580b1e867470ea40f 100644 (file)
@@ -21,6 +21,9 @@
 #include <asm/ustack.h>
 #include <asm/privop.h>
 
+/* Our arch specific arch_init_sched_domain is in arch/ia64/kernel/domain.c */
+#define ARCH_HAS_SCHED_DOMAIN
+
 #define IA64_NUM_DBG_REGS      8
 /*
  * Limits for PMC and PMD are set to less than maximum architected values
index 48e80f041b29f13e4e32583e847c274751e342dd..9c3da05b86191165f6b9c95d3bb91c328b0e96da 100644 (file)
 #include <asm/pal.h>
 #include <asm/percpu.h>
 
-#define GATE_ADDR              RGN_BASE(RGN_GATE)
-
+#define GATE_ADDR              __IA64_UL_CONST(0xa000000000000000)
 /*
  * 0xa000000000000000+2*PERCPU_PAGE_SIZE
  * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
  */
-#define KERNEL_START            (GATE_ADDR+0x100000000)
+#define KERNEL_START            __IA64_UL_CONST(0xa000000100000000)
 #define PERCPU_ADDR            (-PERCPU_PAGE_SIZE)
 
 #ifndef __ASSEMBLY__
@@ -184,6 +183,8 @@ do {                                                                \
 
 #ifdef __KERNEL__
 
+#define prepare_to_switch()    do { } while(0)
+
 #ifdef CONFIG_IA32_SUPPORT
 # define IS_IA32_PROCESS(regs) (ia64_psr(regs)->is != 0)
 #else
@@ -273,9 +274,14 @@ extern void ia64_load_extra (struct task_struct *task);
  * of that CPU which will not be released, because there we wait for the
  * tasklist_lock to become available.
  */
-#define __ARCH_WANT_UNLOCKED_CTXSW
+#define prepare_arch_switch(rq, next)          \
+do {                                           \
+       spin_lock(&(next)->switch_lock);        \
+       spin_unlock(&(rq)->lock);               \
+} while (0)
+#define finish_arch_switch(rq, prev)   spin_unlock_irq(&(prev)->switch_lock)
+#define task_running(rq, p)            ((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock))
 
-#define ARCH_HAS_PREFETCH_SWITCH_STACK
 #define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
 
 void cpu_idle_wait(void);
index c9a5afb71117ef69e0591e1c3d8a558fb61885c3..e142a4ae27a902f793ce39b89e17f6f867521f19 100644 (file)
@@ -67,7 +67,7 @@ struct desc_ptr {
 
 extern struct desc_ptr idt_descr, cpu_gdt_descr[NR_CPUS];
 
-extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
+extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
 
 #define get_cpu_gdt_table(_cpu) ((struct desc_struct *)(cpu_gdt_descr[(_cpu)].address))
 
@@ -95,6 +95,9 @@ extern struct desc_struct default_ldt[];
 extern struct gate_struct idt_table[]; 
 extern struct desc_ptr cpu_gdt_descr[];
 
+/* the cpu gdt accessor */
+#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
+
 static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist)  
 {
        struct gate_struct s;   
@@ -130,6 +133,11 @@ static inline void set_system_gate(int nr, void *func)
        _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, 0); 
 } 
 
+static inline void set_system_gate_ist(int nr, void *func, unsigned ist)
+{
+       _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, ist);
+}
+
 static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type, 
                                         unsigned size) 
 { 
@@ -155,21 +163,20 @@ static inline void set_tss_desc(unsigned cpu, void *addr)
         * -1? seg base+limit should be pointing to the address of the
         * last valid byte
         */
-        set_tssldt_descriptor((struct ldttss_desc *)&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS], 
+        set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_TSS], 
                (unsigned long)addr, DESC_TSS,
                IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
 } 
 
 static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
 { 
-       set_tssldt_descriptor((struct ldttss_desc *)&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], 
-                              (unsigned long)addr, 
+       set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_LDT], (unsigned long)addr,
                              DESC_LDT, size * 8 - 1);
 }
 
 static inline void set_seg_base(unsigned cpu, int entry, void *base)
 { 
-       struct desc_struct *d = (struct desc_struct *)&get_cpu_gdt_table(cpu)[entry];
+       struct desc_struct *d = &cpu_gdt(cpu)[entry];
        u32 addr = (u32)(u64)base;
        BUG_ON((u64)base >> 32); 
        d->base0 = addr & 0xffff;
@@ -212,7 +219,7 @@ static inline void set_seg_base(unsigned cpu, int entry, void *base)
 static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
 {
 #if 0
-       u64 *gdt = (u64 *)(cpu_gdt_table[cpu] + GDT_ENTRY_TLS_MIN);
+       u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN);
        gdt[0] = t->tls_array[0];
        gdt[1] = t->tls_array[1];
        gdt[2] = t->tls_array[2];
index a608959ecba86bd5b3dc36fb6a226f88787929f7..58b5d99dadbead7c0a687502ae7f9343e104ca4e 100644 (file)
@@ -1 +1,191 @@
+#ifndef _X8664_DMA_MAPPING_H
+#define _X8664_DMA_MAPPING_H 1
+
+/*
+ * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for
+ * documentation.
+ */
+
+#include <linux/config.h>
+
+#include <asm/scatterlist.h>
+#include <asm/io.h>
+#include <asm/swiotlb.h>
+
+struct dma_mapping_ops {
+       int             (*mapping_error)(dma_addr_t dma_addr);
+       void*           (*alloc_coherent)(struct device *dev, size_t size,
+                                dma_addr_t *dma_handle, gfp_t gfp);
+       void            (*free_coherent)(struct device *dev, size_t size,
+                                void *vaddr, dma_addr_t dma_handle);
+       dma_addr_t      (*map_single)(struct device *hwdev, void *ptr,
+                                size_t size, int direction);
+       /* like map_single, but doesn't check the device mask */
+       dma_addr_t      (*map_simple)(struct device *hwdev, char *ptr,
+                                size_t size, int direction);
+       void            (*unmap_single)(struct device *dev, dma_addr_t addr,
+                               size_t size, int direction);
+       void            (*sync_single_for_cpu)(struct device *hwdev,
+                               dma_addr_t dma_handle, size_t size,
+                               int direction);
+       void            (*sync_single_for_device)(struct device *hwdev,
+                                dma_addr_t dma_handle, size_t size,
+                               int direction);
+       void            (*sync_single_range_for_cpu)(struct device *hwdev,
+                                dma_addr_t dma_handle, unsigned long offset,
+                               size_t size, int direction);
+       void            (*sync_single_range_for_device)(struct device *hwdev,
+                               dma_addr_t dma_handle, unsigned long offset,
+                               size_t size, int direction);
+       void            (*sync_sg_for_cpu)(struct device *hwdev,
+                                struct scatterlist *sg, int nelems,
+                               int direction);
+       void            (*sync_sg_for_device)(struct device *hwdev,
+                               struct scatterlist *sg, int nelems,
+                               int direction);
+       int             (*map_sg)(struct device *hwdev, struct scatterlist *sg,
+                               int nents, int direction);
+       void            (*unmap_sg)(struct device *hwdev,
+                               struct scatterlist *sg, int nents,
+                               int direction);
+       int             (*dma_supported)(struct device *hwdev, u64 mask);
+       int             is_phys;
+};
+
+extern dma_addr_t bad_dma_address;
+extern struct dma_mapping_ops* dma_ops;
+extern int iommu_merge;
+
+#if 0
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+       if (dma_ops->mapping_error)
+               return dma_ops->mapping_error(dma_addr);
+
+       return (dma_addr == bad_dma_address);
+}
+
+extern void *dma_alloc_coherent(struct device *dev, size_t size,
+                               dma_addr_t *dma_handle, gfp_t gfp);
+extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
+                             dma_addr_t dma_handle);
+
+static inline dma_addr_t
+dma_map_single(struct device *hwdev, void *ptr, size_t size,
+              int direction)
+{
+       return dma_ops->map_single(hwdev, ptr, size, direction);
+}
+
+static inline void
+dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
+                int direction)
+{
+       dma_ops->unmap_single(dev, addr, size, direction);
+}
+
+#define dma_map_page(dev,page,offset,size,dir) \
+       dma_map_single((dev), page_address(page)+(offset), (size), (dir))
+
+#define dma_unmap_page dma_unmap_single
+
+static inline void
+dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
+                       size_t size, int direction)
+{
+       if (dma_ops->sync_single_for_cpu)
+               dma_ops->sync_single_for_cpu(hwdev, dma_handle, size,
+                                            direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle,
+                          size_t size, int direction)
+{
+       if (dma_ops->sync_single_for_device)
+               dma_ops->sync_single_for_device(hwdev, dma_handle, size,
+                                               direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
+                             unsigned long offset, size_t size, int direction)
+{
+       if (dma_ops->sync_single_range_for_cpu) {
+               dma_ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, size, direction);
+       }
+
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
+                                unsigned long offset, size_t size, int direction)
+{
+       if (dma_ops->sync_single_range_for_device)
+               dma_ops->sync_single_range_for_device(hwdev, dma_handle,
+                                                     offset, size, direction);
+
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
+                   int nelems, int direction)
+{
+       if (dma_ops->sync_sg_for_cpu)
+               dma_ops->sync_sg_for_cpu(hwdev, sg, nelems, direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
+                      int nelems, int direction)
+{
+       if (dma_ops->sync_sg_for_device) {
+               dma_ops->sync_sg_for_device(hwdev, sg, nelems, direction);
+       }
+
+       flush_write_buffers();
+}
+
+static inline int
+dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, int direction)
+{
+       return dma_ops->map_sg(hwdev, sg, nents, direction);
+}
+
+static inline void
+dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+            int direction)
+{
+       dma_ops->unmap_sg(hwdev, sg, nents, direction);
+}
+
+extern int dma_supported(struct device *hwdev, u64 mask);
+
+/* same for gart, swiotlb, and nommu */
+static inline int dma_get_cache_alignment(void)
+{
+       return boot_cpu_data.x86_clflush_size;
+}
+
+#define dma_is_consistent(h) 1
+
+extern int dma_set_mask(struct device *dev, u64 mask);
+
+static inline void
+dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction dir)
+{
+       flush_write_buffers();
+}
+
+extern struct device fallback_dev;
+extern int panic_on_overflow;
+#endif
+
+#endif /* _X8664_DMA_MAPPING_H */
+
 #include <asm-i386/mach-xen/asm/dma-mapping.h>
index 0addc4b71a83365ac53b951bd60b7699ef2dbf40..6b598d036d4fd199999382b21b4781fbb7131cad 100644 (file)
@@ -93,7 +93,7 @@ extern void __this_fixmap_does_not_exist(void);
  * directly without translation, we catch the bug with a NULL-deference
  * kernel oops. Illegal ranges of incoming indices are caught too.
  */
-static inline unsigned long fix_to_virt(const unsigned int idx)
+static __always_inline unsigned long fix_to_virt(const unsigned int idx)
 {
        /*
         * this branch gets completely eliminated after inlining,
index 871c01b4ce209529632f0059b1aa9c4c5d09b1c9..32607a4e726599024dc7ef1eea504aea64fbdbcf 100644 (file)
@@ -46,19 +46,19 @@ struct hw_interrupt_type;
  *  some of the following vectors are 'rare', they are merged
  *  into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
  *  TLB, reschedule and local APIC vectors are performance-critical.
- *
- *  Vectors 0xf0-0xf9 are free (reserved for future Linux use).
  */
 #ifndef CONFIG_XEN
 #define SPURIOUS_APIC_VECTOR   0xff
 #define ERROR_APIC_VECTOR      0xfe
 #define RESCHEDULE_VECTOR      0xfd
 #define CALL_FUNCTION_VECTOR   0xfc
-#define KDB_VECTOR             0xfb    /* reserved for KDB */
+/* fb free - please don't readd KDB here because it's useless
+   (hint - think what a NMI bit does to a vector) */
 #define THERMAL_APIC_VECTOR    0xfa
 #define THRESHOLD_APIC_VECTOR   0xf9
-#define INVALIDATE_TLB_VECTOR_END      0xf8
-#define INVALIDATE_TLB_VECTOR_START    0xf0    /* f0-f8 used for TLB flush */
+/* f8 free */
+#define INVALIDATE_TLB_VECTOR_END      0xf7
+#define INVALIDATE_TLB_VECTOR_START    0xf0    /* f0-f7 used for TLB flush */
 
 #define NUM_INVALIDATE_TLB_VECTORS     8
 #endif
index 8d3018e6927c0c9815015d109da5d4679d41747d..68f105d9e67312c2a5fbf6da66d0cbf82f12136d 100644 (file)
@@ -158,6 +158,11 @@ static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
 extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
 extern void iounmap(volatile void __iomem *addr);
 
+/* Use normal IO mappings for DMI */
+#define dmi_ioremap ioremap
+#define dmi_iounmap(x,l) iounmap(x)
+#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
+
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
index f93f5372e01f187d62f41463c125482b56496069..b3773002dc807a51f1d397e0c8fbfe0809d95f8f 100644 (file)
@@ -18,7 +18,7 @@ void destroy_context(struct mm_struct *mm);
 
 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
-#if 0 /*  XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
        if (read_pda(mmu_state) == TLBSTATE_OK) 
                write_pda(mmu_state, TLBSTATE_LAZY);
 #endif
@@ -78,7 +78,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 
                /* stop flush ipis for the previous mm */
                clear_bit(cpu, &prev->cpu_vm_mask);
-#if 0  /* XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
                write_pda(mmu_state, TLBSTATE_OK);
                write_pda(active_mm, next);
 #endif
@@ -104,8 +104,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 
                BUG_ON(HYPERVISOR_mmuext_op(_op, op-_op, NULL, DOMID_SELF));
        }
-
-#if 0 /* XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
        else {
                write_pda(mmu_state, TLBSTATE_OK);
                if (read_pda(active_mm) != next)
index e833e6a5aca1af57be952596c0e51a0726930f4b..e5e07649b712a6212d0887acd95ee7c879b3b445 100644 (file)
 #define PHYSICAL_PAGE_MASK     (~(PAGE_SIZE-1) & __PHYSICAL_MASK)
 
 #define THREAD_ORDER 1 
-#ifdef __ASSEMBLY__
-#define THREAD_SIZE  (1 << (PAGE_SHIFT + THREAD_ORDER))
-#else
-#define THREAD_SIZE  (1UL << (PAGE_SHIFT + THREAD_ORDER))
-#endif
+#define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
 #define CURRENT_MASK (~(THREAD_SIZE-1))
 
+#define EXCEPTION_STACK_ORDER 0
+#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
+
+#define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER
+#define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
+
+#define IRQSTACK_ORDER 2
+#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER)
+
+#define STACKFAULT_STACK 1
+#define DOUBLEFAULT_STACK 2
+#define NMI_STACK 3
+#define DEBUG_STACK 4
+#define MCE_STACK 5
+#define N_EXCEPTION_STACKS 5  /* hw limit: 7 */
+
 #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
 #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
 
index 74a4b7d4fdd6d90eb0ba48345b85a519052fe832..c453b01c1cbc801f2623ff6d5ea762f7563c6bc1 100644 (file)
@@ -42,18 +42,20 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
 #include <asm/scatterlist.h>
 #include <linux/string.h>
 #include <asm/page.h>
+#include <linux/dma-mapping.h> /* for have_iommu */
 
 extern int iommu_setup(char *opt);
 
-#ifdef CONFIG_GART_IOMMU
 /* The PCI address space does equal the physical memory
  * address space.  The networking and block device layers use
  * this boolean for bounce buffer decisions
  *
- * On AMD64 it mostly equals, but we set it to zero to tell some subsystems
- * that an IOMMU is available.
+ * On AMD64 it mostly equals, but we set it to zero if a hardware
+ * IOMMU (gart) of sotware IOMMU (swiotlb) is available.
  */
-#define PCI_DMA_BUS_IS_PHYS    (no_iommu ? 1 : 0)
+#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
+
+#ifdef CONFIG_GART_IOMMU
 
 /*
  * x86-64 always supports DAC, but sometimes it is useful to force
@@ -78,8 +80,6 @@ extern int iommu_sac_force;
 
 #elif defined(CONFIG_SWIOTLB)
 
-#define PCI_DMA_BUS_IS_PHYS    0
-
 #define pci_dac_dma_supported(pci_dev, mask)    1
 
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)      \
@@ -98,7 +98,6 @@ extern int iommu_sac_force;
 #else
 /* No IOMMU */
 
-#define PCI_DMA_BUS_IS_PHYS    1
 #define pci_dac_dma_supported(pci_dev, mask)    1
 
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
index 119c451170fb394c0c4fa8776842585c05465a8e..bc140c97ac0fb0a226e22b43ebc9a2af92ea9acc 100644 (file)
@@ -160,6 +160,8 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long
 
 #define pte_same(a, b)         ((a).pte == (b).pte)
 
+#define pte_pgprot(a)  (__pgprot((a).pte & ~PHYSICAL_PAGE_MASK))
+
 #define PMD_SIZE       (1UL << PMD_SHIFT)
 #define PMD_MASK       (~(PMD_SIZE-1))
 #define PUD_SIZE       (1UL << PUD_SHIFT)
@@ -319,25 +321,25 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
 
 #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT)
 static inline int pte_user(pte_t pte)          { return __pte_val(pte) & _PAGE_USER; }
-extern inline int pte_read(pte_t pte)          { return __pte_val(pte) & _PAGE_USER; }
-extern inline int pte_exec(pte_t pte)          { return __pte_val(pte) & _PAGE_USER; }
-extern inline int pte_dirty(pte_t pte)         { return __pte_val(pte) & _PAGE_DIRTY; }
-extern inline int pte_young(pte_t pte)         { return __pte_val(pte) & _PAGE_ACCESSED; }
-extern inline int pte_write(pte_t pte)         { return __pte_val(pte) & _PAGE_RW; }
+static inline int pte_read(pte_t pte)          { return __pte_val(pte) & _PAGE_USER; }
+static inline int pte_exec(pte_t pte)          { return __pte_val(pte) & _PAGE_USER; }
+static inline int pte_dirty(pte_t pte)         { return __pte_val(pte) & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte)         { return __pte_val(pte) & _PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte)         { return __pte_val(pte) & _PAGE_RW; }
 static inline int pte_file(pte_t pte)          { return __pte_val(pte) & _PAGE_FILE; }
 static inline int pte_huge(pte_t pte)          { return (__pte_val(pte) & __LARGE_PTE) == __LARGE_PTE; }
 
-extern inline pte_t pte_rdprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_USER; return pte; }
-extern inline pte_t pte_exprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_USER; return pte; }
-extern inline pte_t pte_mkclean(pte_t pte)     { __pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
-extern inline pte_t pte_mkold(pte_t pte)       { __pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
-extern inline pte_t pte_wrprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_RW; return pte; }
-extern inline pte_t pte_mkread(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; return pte; }
-extern inline pte_t pte_mkexec(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; return pte; }
-extern inline pte_t pte_mkdirty(pte_t pte)     { __pte_val(pte) |= _PAGE_DIRTY; return pte; }
-extern inline pte_t pte_mkyoung(pte_t pte)     { __pte_val(pte) |= _PAGE_ACCESSED; return pte; }
-extern inline pte_t pte_mkwrite(pte_t pte)     { __pte_val(pte) |= _PAGE_RW; return pte; }
-extern inline pte_t pte_mkhuge(pte_t pte)      { __pte_val(pte) |= __LARGE_PTE; return pte; }
+static inline pte_t pte_rdprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_USER; return pte; }
+static inline pte_t pte_exprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_USER; return pte; }
+static inline pte_t pte_mkclean(pte_t pte)     { __pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)       { __pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_wrprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_RW; return pte; }
+static inline pte_t pte_mkread(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; return pte; }
+static inline pte_t pte_mkexec(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)     { __pte_val(pte) |= _PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)     { __pte_val(pte) |= _PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)     { __pte_val(pte) |= _PAGE_RW; return pte; }
+static inline pte_t pte_mkhuge(pte_t pte)      { __pte_val(pte) |= __LARGE_PTE; return pte; }
 
 struct vm_area_struct;
 
@@ -405,7 +407,7 @@ static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address)
 
 /* This accesses the reference page table of the boot cpu. 
    Other CPUs get synced lazily via the page fault handler. */
-static inline pud_t *pud_offset_k(unsigned long address)
+static inline pud_t *pud_offset_k(pgd_t *pgd, unsigned long address)
 {
        return pud_offset(pgd_offset_k(address), address);
 }
index 34722412e4ef5a626043ca46d36ce8772484b212..51b54a38e135b36d44dad96fc834e1b82edb9243 100644 (file)
@@ -245,7 +245,13 @@ struct tss_struct {
 extern struct cpuinfo_x86 boot_cpu_data;
 DECLARE_PER_CPU(struct tss_struct,init_tss);
 
+#ifdef CONFIG_X86_VSMP
+#define ARCH_MIN_TASKALIGN     (1 << INTERNODE_CACHE_SHIFT)
+#define ARCH_MIN_MMSTRUCT_ALIGN        (1 << INTERNODE_CACHE_SHIFT)
+#else
 #define ARCH_MIN_TASKALIGN     16
+#define ARCH_MIN_MMSTRUCT_ALIGN        0
+#endif
 
 struct thread_struct {
        unsigned long   rsp0;
@@ -286,15 +292,6 @@ struct thread_struct {
 #define INIT_MMAP \
 { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
 
-#define STACKFAULT_STACK 1
-#define DOUBLEFAULT_STACK 2 
-#define NMI_STACK 3 
-#define DEBUG_STACK 4 
-#define MCE_STACK 5
-#define N_EXCEPTION_STACKS 5  /* hw limit: 7 */
-#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
-#define EXCEPTION_STACK_ORDER 0 
-
 #define start_thread(regs,new_rip,new_rsp) do { \
        asm volatile("movl %0,%%fs; movl %0,%%es; movl %0,%%ds": :"r" (0));      \
        load_gs_index(0);                                                       \
@@ -333,8 +330,8 @@ extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 #define thread_saved_pc(t) (*(unsigned long *)((t)->thread.rsp - 8))
 
 extern unsigned long get_wchan(struct task_struct *p);
-#define KSTK_EIP(tsk) \
-       (((struct pt_regs *)(tsk->thread.rsp0 - sizeof(struct pt_regs)))->rip)
+#define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.rsp0 - 1)
+#define KSTK_EIP(tsk) (task_pt_regs(tsk)->rip)
 #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
 
 
@@ -496,4 +493,6 @@ extern unsigned long boot_option_idle_override;
 /* Boot loader type from the setup header */
 extern int bootloader_type;
 
+#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
+
 #endif /* __ASM_X86_64_PROCESSOR_H */
index e00247dc8191742945e8690429d371709cda03d9..729a4d19a57b9415fb3b5c2759f450f58c68829e 100644 (file)
 #define __USER_DS     0x2b   /* 5*8+3 */ 
 #define __USER_CS     0x33   /* 6*8+3 */ 
 #define __USER32_DS    __USER_DS 
-#define __KERNEL16_CS  (GDT_ENTRY_KERNELCS16 * 8)
-#define __KERNEL_COMPAT32_CS   0x8
 
 #define GDT_ENTRY_TLS 1
 #define GDT_ENTRY_TSS 8        /* needs two entries */
 #define GDT_ENTRY_LDT 10 /* needs two entries */
 #define GDT_ENTRY_TLS_MIN 12
 #define GDT_ENTRY_TLS_MAX 14
-#define GDT_ENTRY_KERNELCS16 15
+/* 15 free */
 
 #define GDT_ENTRY_TLS_ENTRIES 3
 
index 8f33a1d9e4f02477bad30a964600cdf1aadc55b6..69f69d9377fdbbe802bcc6f19d9c58da0cc66456 100644 (file)
@@ -34,6 +34,7 @@ struct pt_regs;
 extern cpumask_t cpu_present_mask;
 extern cpumask_t cpu_possible_map;
 extern cpumask_t cpu_online_map;
+extern cpumask_t cpu_initialized;
 
 /*
  * Private routines/data
index 66432b201d985ca85f31c00de647ddd4d930b493..7520d06eacd020d3d3aa7b579b274744fc271b12 100644 (file)
@@ -29,8 +29,8 @@
 #define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
 
 /* frame pointer must be last for get_wchan */
-#define SAVE_CONTEXT    "pushfq ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
-#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popfq\n\t" 
+#define SAVE_CONTEXT    "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
+#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
 
 #define __EXTRA_CLOBBER  \
        ,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
@@ -147,6 +147,21 @@ struct alt_instr {
                      "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
                      ".previous" :: "i" (feature), ##input)
 
+/* Like alternative_input, but with a single output argument */
+#define alternative_io(oldinstr, newinstr, feature, output, input...) \
+       asm volatile ("661:\n\t" oldinstr "\n662:\n"                    \
+                     ".section .altinstructions,\"a\"\n"               \
+                     "  .align 8\n"                                    \
+                     "  .quad 661b\n"            /* label */           \
+                     "  .quad 663f\n"            /* new instruction */ \
+                     "  .byte %c[feat]\n"        /* feature bit */     \
+                     "  .byte 662b-661b\n"       /* sourcelen */       \
+                     "  .byte 664f-663f\n"       /* replacementlen */  \
+                     ".previous\n"                                     \
+                     ".section .altinstr_replacement,\"ax\"\n"         \
+                     "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
+                     ".previous" : output : [feat] "i" (feature), ##input)
+
 /*
  * Clear and set 'TS' bit respectively
  */
@@ -188,6 +203,15 @@ static inline void write_cr4(unsigned long val)
 #define wbinvd() \
        __asm__ __volatile__ ("wbinvd": : :"memory");
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 #endif /* __KERNEL__ */
 
 #define nop() __asm__ __volatile__ ("nop")
@@ -374,8 +398,6 @@ do {                                                                        \
                preempt_enable_no_resched();                            \
 } while (0)
 
-#define safe_halt()            ((void)0)
-
 #define __save_and_cli(x)                                              \
 do {                                                                   \
        vcpu_info_t *_vcpu;                                             \
@@ -387,8 +409,6 @@ do {                                                                        \
        barrier();                                                      \
 } while (0)
 
-void cpu_idle_wait(void);
-
 #define local_irq_save(x)      __save_and_cli(x)
 #define local_irq_restore(x)   __restore_flags(x)
 #define local_save_flags(x)    __save_flags(x)
@@ -405,12 +425,10 @@ void cpu_idle_wait(void);
        preempt_enable_no_resched();                                    \
        ___x; })
 
-/*
- * disable hlt during certain critical i/o operations
- */
-#define HAVE_DISABLE_HLT
-void disable_hlt(void);
-void enable_hlt(void);
+#define safe_halt()            ((void)0)
+#define halt()                 ((void)0)
+
+void cpu_idle_wait(void);
 
 extern unsigned long arch_align_stack(unsigned long sp);
 
index ea28b98cbafb7d88c1a55ced388553fa03aecfd9..ef4d51e55e980ddab9a25dbf923036007e7af235 100644 (file)
@@ -57,6 +57,7 @@ struct vm_area_struct;
                        __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
                        __GFP_NOMEMALLOC|__GFP_HARDWALL)
 
+/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
 #define GFP_ATOMIC     (__GFP_HIGH)
 #define GFP_NOIO       (__GFP_WAIT)
 #define GFP_NOFS       (__GFP_WAIT | __GFP_IO)
@@ -113,6 +114,10 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
        if (unlikely(order >= MAX_ORDER))
                return NULL;
 
+       /* Unknown node is current node */
+       if (nid < 0)
+               nid = numa_node_id();
+
        return __alloc_pages(gfp_mask, order,
                NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
 }
index d1057f4c6dca6b40e3fbce2acae57efc8f6e3de1..4ffabba098c8fdfb2ed19efcf3a2d925c4079ab2 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/config.h>
 #include <linux/smp.h>
 
-#if !defined(CONFIG_ARCH_S390)
+#if !defined(CONFIG_S390)
 
 #include <linux/linkage.h>
 #include <linux/cache.h>
@@ -224,6 +224,17 @@ extern void note_interrupt(unsigned int irq, irq_desc_t *desc,
 extern int can_request_irq(unsigned int irq, unsigned long irqflags);
 
 extern void init_irq_proc(void);
+
+#ifdef CONFIG_AUTO_IRQ_AFFINITY
+extern int select_smp_affinity(unsigned int irq);
+#else
+static inline int
+select_smp_affinity(unsigned int irq)
+{
+       return 1;
+}
+#endif
+
 #endif
 
 extern hw_irq_controller no_irq_type;  /* needed in every arch ? */
index af29f6905dee0c1e4ded8437eb5bb99ee03fe57d..af54e371e054e98eb56dba138c03e40f56ff0c50 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/sched.h>
 #include <linux/errno.h>
+#include <linux/capability.h>
 
 #ifdef __KERNEL__
 
@@ -13,6 +14,7 @@
 #include <linux/rbtree.h>
 #include <linux/prio_tree.h>
 #include <linux/fs.h>
+#include <linux/mutex.h>
 
 struct mempolicy;
 struct anon_vma;
@@ -226,24 +228,30 @@ struct page {
                                         * & limit reverse map searches.
                                         */
        union {
-               unsigned long private;  /* Mapping-private opaque data:
-                                        * usually used for buffer_heads
-                                        * if PagePrivate set; used for
-                                        * swp_entry_t if PageSwapCache
-                                        * When page is free, this indicates
-                                        * order in the buddy system.
-                                        */
+           struct {
+               unsigned long private;          /* Mapping-private opaque data:
+                                                * usually used for buffer_heads
+                                                * if PagePrivate set; used for
+                                                * swp_entry_t if PageSwapCache.
+                                                * When page is free, this
+                                                * indicates order in the buddy
+                                                * system.
+                                                */
+               struct address_space *mapping;  /* If low bit clear, points to
+                                                * inode address_space, or NULL.
+                                                * If page mapped as anonymous
+                                                * memory, low bit is set, and
+                                                * it points to anon_vma object:
+                                                * see PAGE_MAPPING_ANON below.
+                                                */
+           };
 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
-               spinlock_t ptl;
+           spinlock_t ptl;
 #endif
-       } u;
-       struct address_space *mapping;  /* If low bit clear, points to
-                                        * inode address_space, or NULL.
-                                        * If page mapped as anonymous
-                                        * memory, low bit is set, and
-                                        * it points to anon_vma object:
-                                        * see PAGE_MAPPING_ANON below.
-                                        */
+#ifdef CONFIG_XEN
+           struct list_head ballooned;
+#endif
+       };
        pgoff_t index;                  /* Our offset within mapping. */
        struct list_head lru;           /* Pageout list, eg. active_list
                                         * protected by zone->lru_lock !
@@ -264,8 +272,8 @@ struct page {
 #endif /* WANT_PAGE_VIRTUAL */
 };
 
-#define page_private(page)             ((page)->u.private)
-#define set_page_private(page, v)      ((page)->u.private = (v))
+#define page_private(page)             ((page)->private)
+#define set_page_private(page, v)      ((page)->private = (v))
 
 /*
  * FIXME: take this include out, include page-flags.h in
@@ -311,7 +319,7 @@ struct page {
  */
 #define get_page_testone(p)    atomic_inc_and_test(&(p)->_count)
 
-#define set_page_count(p,v)    atomic_set(&(p)->_count, v - 1)
+#define set_page_count(p,v)    atomic_set(&(p)->_count, (v) - 1)
 #define __put_page(p)          atomic_dec(&(p)->_count)
 
 extern void FASTCALL(__page_cache_release(struct page *));
@@ -510,7 +518,7 @@ static inline void set_page_links(struct page *page, unsigned long zone,
 extern struct page *mem_map;
 #endif
 
-static inline void *lowmem_page_address(struct page *page)
+static __always_inline void *lowmem_page_address(struct page *page)
 {
        return __va(page_to_pfn(page) << PAGE_SHIFT);
 }
@@ -637,14 +645,38 @@ struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
 int shmem_lock(struct file *file, int lock, struct user_struct *user);
 #else
 #define shmem_nopage filemap_nopage
-#define shmem_lock(a, b, c)    ({0;})  /* always in memory, no need to lock */
-#define shmem_set_policy(a, b) (0)
-#define shmem_get_policy(a, b) (NULL)
+
+static inline int shmem_lock(struct file *file, int lock,
+                            struct user_struct *user)
+{
+       return 0;
+}
+
+static inline int shmem_set_policy(struct vm_area_struct *vma,
+                                  struct mempolicy *new)
+{
+       return 0;
+}
+
+static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
+                                                unsigned long addr)
+{
+       return NULL;
+}
 #endif
 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
+extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
 
 int shmem_zero_setup(struct vm_area_struct *);
 
+#ifndef CONFIG_MMU
+extern unsigned long shmem_get_unmapped_area(struct file *file,
+                                            unsigned long addr,
+                                            unsigned long len,
+                                            unsigned long pgoff,
+                                            unsigned long flags);
+#endif
+
 static inline int can_do_mlock(void)
 {
        if (capable(CAP_IPC_LOCK))
@@ -693,14 +725,31 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
 }
 
 extern int vmtruncate(struct inode * inode, loff_t offset);
+extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
 extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
-extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access);
 
-static inline int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access)
+#ifdef CONFIG_MMU
+extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
+                       unsigned long address, int write_access);
+
+static inline int handle_mm_fault(struct mm_struct *mm,
+                       struct vm_area_struct *vma, unsigned long address,
+                       int write_access)
+{
+       return __handle_mm_fault(mm, vma, address, write_access) &
+                               (~VM_FAULT_WRITE);
+}
+#else
+static inline int handle_mm_fault(struct mm_struct *mm,
+                       struct vm_area_struct *vma, unsigned long address,
+                       int write_access)
 {
-       return __handle_mm_fault(mm, vma, address, write_access) & (~VM_FAULT_WRITE);
+       /* should never happen if there's no MMU */
+       BUG();
+       return VM_FAULT_SIGBUS;
 }
+#endif
 
 extern int make_pages_present(unsigned long addr, unsigned long end);
 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
@@ -777,7 +826,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
  * overflow into the next struct page (as it might with DEBUG_SPINLOCK).
  * When freeing, reset page->mapping so free_pages_check won't complain.
  */
-#define __pte_lockptr(page)    &((page)->u.ptl)
+#define __pte_lockptr(page)    &((page)->ptl)
 #define pte_lock_init(_page)   do {                                    \
        spin_lock_init(__pte_lockptr(_page));                           \
 } while (0)
@@ -899,6 +948,8 @@ extern unsigned long do_brk(unsigned long, unsigned long);
 /* filemap.c */
 extern unsigned long page_unuse(struct page *);
 extern void truncate_inode_pages(struct address_space *, loff_t);
+extern void truncate_inode_pages_range(struct address_space *,
+                                      loff_t lstart, loff_t lend);
 
 /* generic vm_area_ops exported for stackable file systems */
 extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
@@ -988,6 +1039,9 @@ static inline void vm_stat_account(struct mm_struct *mm,
 static inline void
 kernel_map_pages(struct page *page, int numpages, int enable)
 {
+       if (!PageHighMem(page) && !enable)
+               mutex_debug_check_no_locks_freed(page_address(page),
+                                                numpages * PAGE_SIZE);
 }
 #endif
 
@@ -1003,5 +1057,12 @@ int in_gate_area_no_task(unsigned long addr);
 /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
 #define OOM_DISABLE -17
 
+int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
+                                       void __user *, size_t *, loff_t *);
+int shrink_slab(unsigned long scanned, gfp_t gfp_mask,
+                       unsigned long lru_pages);
+void drop_pagecache(void);
+void drop_slab(void);
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
index 8a235b12807b382f18b1c11f2ed99591e9d0ade5..0d2052865f32b6e9a43a7ef24f68542ace88b54a 100644 (file)
@@ -32,7 +32,6 @@
 
 #define HAVE_ALLOC_SKB         /* For the drivers to know */
 #define HAVE_ALIGNABLE_SKB     /* Ditto 8)                */
-#define SLAB_SKB               /* Slabified skbuffs       */
 
 #define CHECKSUM_NONE 0
 #define CHECKSUM_HW 1
@@ -134,7 +133,7 @@ struct skb_frag_struct {
  */
 struct skb_shared_info {
        atomic_t        dataref;
-       unsigned int    nr_frags;
+       unsigned short  nr_frags;
        unsigned short  tso_size;
        unsigned short  tso_segs;
        unsigned short  ufo_size;
@@ -254,7 +253,7 @@ struct sk_buff {
         * want to keep them across layers you have to do a skb_clone()
         * first. This is owned by whoever has the skb queued ATM.
         */
-       char                    cb[40];
+       char                    cb[48];
 
        unsigned int            len,
                                data_len,
@@ -936,7 +935,7 @@ static inline int skb_tailroom(const struct sk_buff *skb)
  *     Increase the headroom of an empty &sk_buff by reducing the tail
  *     room. This is only allowed for an empty buffer.
  */
-static inline void skb_reserve(struct sk_buff *skb, unsigned int len)
+static inline void skb_reserve(struct sk_buff *skb, int len)
 {
        skb->data += len;
        skb->tail += len;
@@ -1248,6 +1247,8 @@ extern int               skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
                                                        int hlen,
                                                        struct iovec *iov);
 extern void           skb_free_datagram(struct sock *sk, struct sk_buff *skb);
+extern void           skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
+                                        unsigned int flags);
 extern unsigned int    skb_checksum(const struct sk_buff *skb, int offset,
                                    int len, unsigned int csum);
 extern int            skb_copy_bits(const struct sk_buff *skb, int offset,
index 72a5777ad0d0095c1551d3c2cab1147b55c8a9e7..21628b33514c8bc6c1e5416aa13325e1303d36d9 100644 (file)
@@ -88,7 +88,7 @@ struct xenbus_driver {
        int (*remove)(struct xenbus_device *dev);
        int (*suspend)(struct xenbus_device *dev);
        int (*resume)(struct xenbus_device *dev);
-       int (*hotplug)(struct xenbus_device *, char **, int, char *, int);
+       int (*uevent)(struct xenbus_device *, char **, int, char *, int);
        struct device_driver driver;
        int (*read_otherend_details)(struct xenbus_device *dev);
 };
index 84c96f0c1c97fd625929f9cd0d593f87c8c284be..0139444c45e4e88e72fb597f9b762333aff1bbe1 100644 (file)
@@ -412,6 +412,8 @@ int request_irq(unsigned int irq,
        action->next = NULL;
        action->dev_id = dev_id;
 
+       select_smp_affinity(irq);
+
        retval = setup_irq(irq, action);
        if (retval)
                kfree(action);
index 21ce018d0748cdab35096975ae2f281b0eb936a6..f50aa3aa87f468ede4fa2ef1c4e524fb5bab27c4 100644 (file)
@@ -9,15 +9,9 @@ config PRINTK_TIME
          in kernel startup.
 
 
-config DEBUG_KERNEL
-       bool "Kernel debugging"
-       help
-         Say Y here if you are developing drivers or trying to debug and
-         identify kernel problems.
-
 config MAGIC_SYSRQ
        bool "Magic SysRq key"
-       depends on DEBUG_KERNEL && !UML
+       depends on !UML
        help
          If you say Y here, you will have some control over the system even
          if the system crashes for example during kernel debugging (e.g., you
@@ -29,10 +23,16 @@ config MAGIC_SYSRQ
          keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
          unless you really know what this hack does.
 
+config DEBUG_KERNEL
+       bool "Kernel debugging"
+       help
+         Say Y here if you are developing drivers or trying to debug and
+         identify kernel problems.
+
 config LOG_BUF_SHIFT
        int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
        range 12 21
-       default 17 if ARCH_S390
+       default 17 if S390
        default 16 if X86_NUMAQ || IA64
        default 15 if SMP
        default 14
@@ -79,7 +79,7 @@ config SCHEDSTATS
 
 config DEBUG_SLAB
        bool "Debug memory allocations"
-       depends on DEBUG_KERNEL
+       depends on DEBUG_KERNEL && SLAB
        help
          Say Y here to have the kernel do limited verification on memory
          allocation as well as poisoning memory on free to catch use of freed
@@ -95,6 +95,14 @@ config DEBUG_PREEMPT
          if kernel code uses it in a preemption-unsafe way. Also, the kernel
          will detect preemption count underflows.
 
+config DEBUG_MUTEXES
+       bool "Mutex debugging, deadlock detection"
+       default y
+       depends on DEBUG_KERNEL
+       help
+        This allows mutex semantics violations and mutex related deadlocks
+        (lockups) to be detected and reported automatically.
+
 config DEBUG_SPINLOCK
        bool "Spinlock debugging"
        depends on DEBUG_KERNEL
@@ -172,7 +180,8 @@ config DEBUG_VM
        bool "Debug VM"
        depends on DEBUG_KERNEL
        help
-         Enable this to debug the virtual-memory system.
+         Enable this to turn on extended checks in the virtual-memory system
+          that may impact performance.
 
          If unsure, say N.
 
@@ -186,6 +195,20 @@ config FRAME_POINTER
          some architectures or if you use external debuggers.
          If you don't debug the kernel, you can say N.
 
+config FORCED_INLINING
+       bool "Force gcc to inline functions marked 'inline'"
+       depends on DEBUG_KERNEL
+       default y
+       help
+         This option determines if the kernel forces gcc to inline the functions
+         developers have marked 'inline'. Doing so takes away freedom from gcc to
+         do what it thinks is best, which is desirable for the gcc 3.x series of
+         compilers. The gcc 4.x series have a rewritten inlining algorithm and
+         disabling this option will generate a smaller kernel there. Hopefully
+         this algorithm is so good that allowing gcc4 to make the decision can
+         become the default in the future, until then this option is there to
+         test gcc for this.
+
 config RCU_TORTURE_TEST
        tristate "torture tests for RCU"
        depends on DEBUG_KERNEL
index 4338bbe0687d2766bdc1661696035cd219a001c9..909b2a08f8f389aee0fef6137051edd5bbe0498c 100644 (file)
@@ -11,7 +11,7 @@ choice
 
 config FLATMEM_MANUAL
        bool "Flat Memory"
-       depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE
+       depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || ARCH_FLATMEM_ENABLE
        help
          This option allows you to change some of the ways that
          Linux manages its memory internally.  Most users will
@@ -135,3 +135,10 @@ config SPLIT_PTLOCK_CPUS
        default "4096" if PARISC && !PA20
        default "4096" if XEN
        default "4"
+
+#
+# support for page migration
+#
+config MIGRATION
+       def_bool y if NUMA || SPARSEMEM || DISCONTIGMEM
+       depends on SWAP
index a00a1057bfe42be9f53631ca8ebc05fe254daf60..14ca5c00d499064c83b5eaa2217dfb913434e9b1 100644 (file)
@@ -1614,7 +1614,7 @@ gotten:
                update_mmu_cache(vma, address, entry);
                lazy_mmu_prot_update(entry);
                lru_cache_add_active(new_page);
-               page_add_anon_rmap(new_page, vma, address);
+               page_add_new_anon_rmap(new_page, vma, address);
 
                /* Free the old page.. */
                new_page = old_page;
@@ -1886,9 +1886,32 @@ out_big:
 out_busy:
        return -ETXTBSY;
 }
-
 EXPORT_SYMBOL(vmtruncate);
 
+int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
+{
+       struct address_space *mapping = inode->i_mapping;
+
+       /*
+        * If the underlying filesystem is not going to provide
+        * a way to truncate a range of blocks (punch a hole) -
+        * we should return failure right now.
+        */
+       if (!inode->i_op || !inode->i_op->truncate_range)
+               return -ENOSYS;
+
+       mutex_lock(&inode->i_mutex);
+       down_write(&inode->i_alloc_sem);
+       unmap_mapping_range(mapping, offset, (end - offset), 1);
+       truncate_inode_pages_range(mapping, offset, end);
+       inode->i_op->truncate_range(inode, offset, end);
+       up_write(&inode->i_alloc_sem);
+       mutex_unlock(&inode->i_mutex);
+
+       return 0;
+}
+EXPORT_SYMBOL(vmtruncate_range);
+
 /* 
  * Primitive swap readahead code. We simply read an aligned block of
  * (1 << page_cluster) entries in the swap area. This method is chosen
@@ -2070,8 +2093,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
                        goto release;
                inc_mm_counter(mm, anon_rss);
                lru_cache_add_active(page);
-               SetPageReferenced(page);
-               page_add_anon_rmap(page, vma, address);
+               page_add_new_anon_rmap(page, vma, address);
        } else {
                /* Map the ZERO_PAGE - vm_page_prot is readonly */
                page = ZERO_PAGE(address);
@@ -2202,7 +2224,7 @@ retry:
                if (anon) {
                        inc_mm_counter(mm, anon_rss);
                        lru_cache_add_active(new_page);
-                       page_add_anon_rmap(new_page, vma, address);
+                       page_add_new_anon_rmap(new_page, vma, address);
                } else {
                        inc_mm_counter(mm, file_rss);
                        page_add_file_rmap(new_page);
@@ -2361,6 +2383,8 @@ int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
        return handle_pte_fault(mm, vma, address, pte, pmd, write_access);
 }
 
+EXPORT_SYMBOL_GPL(__handle_mm_fault);
+
 #ifndef __PAGETABLE_PUD_FOLDED
 /*
  * Allocate page upper directory.
index b9d53b5e79ad085c7867d99bf27b9a9c928b9606..a01e3ffb9d9dd238b459f246fb9041a13ef438e7 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/pagemap.h>
 #include <linux/swap.h>
 #include <linux/syscalls.h>
+#include <linux/capability.h>
 #include <linux/init.h>
 #include <linux/file.h>
 #include <linux/fs.h>
index 5a9daa2fff06bd584c200cf9cd1dde441cfd4650..75f178a4d5e9fbe16a7a9ff8166f7cc81b186ea9 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/memory_hotplug.h>
 #include <linux/nodemask.h>
 #include <linux/vmalloc.h>
+#include <linux/mempolicy.h>
 
 #include <asm/tlbflush.h>
 #include "internal.h"
@@ -52,6 +53,9 @@ struct pglist_data *pgdat_list __read_mostly;
 unsigned long totalram_pages __read_mostly;
 unsigned long totalhigh_pages __read_mostly;
 long nr_swap_pages;
+int percpu_pagelist_fraction;
+
+static void fastcall free_hot_cold_page(struct page *page, int cold);
 
 /*
  * results with 256, 32 in the lowmem_reserve sysctl:
@@ -81,6 +85,7 @@ int min_free_kbytes = 1024;
 unsigned long __initdata nr_kernel_pages;
 unsigned long __initdata nr_all_pages;
 
+#ifdef CONFIG_DEBUG_VM
 static int page_outside_zone_boundaries(struct zone *zone, struct page *page)
 {
        int ret = 0;
@@ -122,16 +127,23 @@ static int bad_range(struct zone *zone, struct page *page)
        return 0;
 }
 
-static void bad_page(const char *function, struct page *page)
+#else
+static inline int bad_range(struct zone *zone, struct page *page)
 {
-       printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
-               function, current->comm, page);
-       printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
-               (int)(2*sizeof(unsigned long)), (unsigned long)page->flags,
-               page->mapping, page_mapcount(page), page_count(page));
-       printk(KERN_EMERG "Backtrace:\n");
+       return 0;
+}
+#endif
+
+static void bad_page(struct page *page)
+{
+       printk(KERN_EMERG "Bad page state in process '%s'\n"
+               KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n"
+               KERN_EMERG "Trying to fix it up, but a reboot is needed\n"
+               KERN_EMERG "Backtrace:\n",
+               current->comm, page, (int)(2*sizeof(unsigned long)),
+               (unsigned long)page->flags, page->mapping,
+               page_mapcount(page), page_count(page));
        dump_stack();
-       printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
        page->flags &= ~(1 << PG_lru    |
                        1 << PG_private |
                        1 << PG_locked  |
@@ -184,19 +196,15 @@ static void destroy_compound_page(struct page *page, unsigned long order)
        int i;
        int nr_pages = 1 << order;
 
-       if (!PageCompound(page))
-               return;
-
-       if (page[1].index != order)
-               bad_page(__FUNCTION__, page);
+       if (unlikely(page[1].index != order))
+               bad_page(page);
 
        for (i = 0; i < nr_pages; i++) {
                struct page *p = page + i;
 
-               if (!PageCompound(p))
-                       bad_page(__FUNCTION__, page);
-               if (page_private(p) != (unsigned long)page)
-                       bad_page(__FUNCTION__, page);
+               if (unlikely(!PageCompound(p) |
+                               (page_private(p) != (unsigned long)page)))
+                       bad_page(page);
                ClearPageCompound(p);
        }
 }
@@ -255,14 +263,20 @@ __find_combined_index(unsigned long page_idx, unsigned int order)
 /*
  * This function checks whether a page is free && is the buddy
  * we can do coalesce a page and its buddy if
- * (a) the buddy is free &&
- * (b) the buddy is on the buddy system &&
- * (c) a page and its buddy have the same order.
+ * (a) the buddy is not in a hole &&
+ * (b) the buddy is free &&
+ * (c) the buddy is on the buddy system &&
+ * (d) a page and its buddy have the same order.
  * for recording page's order, we use page_private(page) and PG_private.
  *
  */
 static inline int page_is_buddy(struct page *page, int order)
 {
+#ifdef CONFIG_HOLES_IN_ZONE
+       if (!pfn_valid(page_to_pfn(page)))
+               return 0;
+#endif
+
        if (PagePrivate(page)           &&
            (page_order(page) == order) &&
             page_count(page) == 0)
@@ -294,13 +308,13 @@ static inline int page_is_buddy(struct page *page, int order)
  * -- wli
  */
 
-static inline void __free_pages_bulk (struct page *page,
+static inline void __free_one_page(struct page *page,
                struct zone *zone, unsigned int order)
 {
        unsigned long page_idx;
        int order_size = 1 << order;
 
-       if (unlikely(order))
+       if (unlikely(PageCompound(page)))
                destroy_compound_page(page, order);
 
        page_idx = page_to_pfn(page) & ((1 << MAX_ORDER) - 1);
@@ -314,17 +328,15 @@ static inline void __free_pages_bulk (struct page *page,
                struct free_area *area;
                struct page *buddy;
 
-               combined_idx = __find_combined_index(page_idx, order);
                buddy = __page_find_buddy(page, page_idx, order);
-
-               if (bad_range(zone, buddy))
-                       break;
                if (!page_is_buddy(buddy, order))
                        break;          /* Move the buddy up one level. */
+
                list_del(&buddy->lru);
                area = zone->free_area + order;
                area->nr_free--;
                rmv_page_order(buddy);
+               combined_idx = __find_combined_index(page_idx, order);
                page = page + (combined_idx - page_idx);
                page_idx = combined_idx;
                order++;
@@ -334,11 +346,11 @@ static inline void __free_pages_bulk (struct page *page,
        zone->free_area[order].nr_free++;
 }
 
-static inline int free_pages_check(const char *function, struct page *page)
+static inline int free_pages_check(struct page *page)
 {
-       if (    page_mapcount(page) ||
-               page->mapping != NULL ||
-               page_count(page) != 0 ||
+       if (unlikely(page_mapcount(page) |
+               (page->mapping != NULL)  |
+               (page_count(page) != 0)  |
                (page->flags & (
                        1 << PG_lru     |
                        1 << PG_private |
@@ -348,8 +360,8 @@ static inline int free_pages_check(const char *function, struct page *page)
                        1 << PG_slab    |
                        1 << PG_swapcache |
                        1 << PG_writeback |
-                       1 << PG_reserved )))
-               bad_page(function, page);
+                       1 << PG_reserved ))))
+               bad_page(page);
        if (PageDirty(page))
                __ClearPageDirty(page);
        /*
@@ -371,52 +383,91 @@ static inline int free_pages_check(const char *function, struct page *page)
  * And clear the zone's pages_scanned counter, to hold off the "all pages are
  * pinned" detection logic.
  */
-static int
-free_pages_bulk(struct zone *zone, int count,
-               struct list_head *list, unsigned int order)
+static void free_pages_bulk(struct zone *zone, int count,
+                                       struct list_head *list, int order)
 {
-       unsigned long flags;
-       struct page *page = NULL;
-       int ret = 0;
-
-       spin_lock_irqsave(&zone->lock, flags);
+       spin_lock(&zone->lock);
        zone->all_unreclaimable = 0;
        zone->pages_scanned = 0;
-       while (!list_empty(list) && count--) {
+       while (count--) {
+               struct page *page;
+
+               BUG_ON(list_empty(list));
                page = list_entry(list->prev, struct page, lru);
-               /* have to delete it as __free_pages_bulk list manipulates */
+               /* have to delete it as __free_one_page list manipulates */
                list_del(&page->lru);
-               __free_pages_bulk(page, zone, order);
-               ret++;
+               __free_one_page(page, zone, order);
        }
-       spin_unlock_irqrestore(&zone->lock, flags);
-       return ret;
+       spin_unlock(&zone->lock);
 }
 
-void __free_pages_ok(struct page *page, unsigned int order)
+static void free_one_page(struct zone *zone, struct page *page, int order)
 {
        LIST_HEAD(list);
+       list_add(&page->lru, &list);
+       free_pages_bulk(zone, 1, &list, order);
+}
+
+static void __free_pages_ok(struct page *page, unsigned int order)
+{
+       unsigned long flags;
        int i;
        int reserved = 0;
 
        if (arch_free_page(page, order))
                return;
+       if (!PageHighMem(page))
+               mutex_debug_check_no_locks_freed(page_address(page),
+                                                PAGE_SIZE<<order);
 
 #ifndef CONFIG_MMU
-       if (order > 0)
-               for (i = 1 ; i < (1 << order) ; ++i)
-                       __put_page(page + i);
+       for (i = 1 ; i < (1 << order) ; ++i)
+               __put_page(page + i);
 #endif
 
        for (i = 0 ; i < (1 << order) ; ++i)
-               reserved += free_pages_check(__FUNCTION__, page + i);
+               reserved += free_pages_check(page + i);
        if (reserved)
                return;
 
-       list_add(&page->lru, &list);
-       mod_page_state(pgfree, 1 << order);
-       kernel_map_pages(page, 1<<order, 0);
-       free_pages_bulk(page_zone(page), 1, &list, order);
+       kernel_map_pages(page, 1 << order, 0);
+       local_irq_save(flags);
+       __mod_page_state(pgfree, 1 << order);
+       free_one_page(page_zone(page), page, order);
+       local_irq_restore(flags);
+}
+
+/*
+ * permit the bootmem allocator to evade page validation on high-order frees
+ */
+void fastcall __init __free_pages_bootmem(struct page *page, unsigned int order)
+{
+       if (order == 0) {
+               __ClearPageReserved(page);
+               set_page_count(page, 0);
+
+               free_hot_cold_page(page, 0);
+       } else {
+               LIST_HEAD(list);
+               int loop;
+
+               for (loop = 0; loop < BITS_PER_LONG; loop++) {
+                       struct page *p = &page[loop];
+
+                       if (loop + 16 < BITS_PER_LONG)
+                               prefetchw(p + 16);
+                       __ClearPageReserved(p);
+                       set_page_count(p, 0);
+               }
+
+               arch_free_page(page, order);
+
+               mod_page_state(pgfree, 1 << order);
+
+               list_add(&page->lru, &list);
+               kernel_map_pages(page, 1 << order, 0);
+               free_pages_bulk(page_zone(page), 1, &list, order);
+       }
 }
 
 
@@ -434,8 +485,7 @@ void __free_pages_ok(struct page *page, unsigned int order)
  *
  * -- wli
  */
-static inline struct page *
-expand(struct zone *zone, struct page *page,
+static inline void expand(struct zone *zone, struct page *page,
        int low, int high, struct free_area *area)
 {
        unsigned long size = 1 << high;
@@ -449,24 +499,6 @@ expand(struct zone *zone, struct page *page,
                area->nr_free++;
                set_page_order(&page[size], high);
        }
-       return page;
-}
-
-void set_page_refs(struct page *page, int order)
-{
-#ifdef CONFIG_MMU
-       set_page_count(page, 1);
-#else
-       int i;
-
-       /*
-        * We need to reference all the pages for this order, otherwise if
-        * anyone accesses one of the pages with (get/put) it will be freed.
-        * - eg: access_process_vm()
-        */
-       for (i = 0; i < (1 << order); i++)
-               set_page_count(page + i, 1);
-#endif /* CONFIG_MMU */
 }
 
 /*
@@ -474,9 +506,9 @@ void set_page_refs(struct page *page, int order)
  */
 static int prep_new_page(struct page *page, int order)
 {
-       if (    page_mapcount(page) ||
-               page->mapping != NULL ||
-               page_count(page) != 0 ||
+       if (unlikely(page_mapcount(page) |
+               (page->mapping != NULL)  |
+               (page_count(page) != 0)  |
                (page->flags & (
                        1 << PG_lru     |
                        1 << PG_private |
@@ -487,8 +519,8 @@ static int prep_new_page(struct page *page, int order)
                        1 << PG_slab    |
                        1 << PG_swapcache |
                        1 << PG_writeback |
-                       1 << PG_reserved )))
-               bad_page(__FUNCTION__, page);
+                       1 << PG_reserved ))))
+               bad_page(page);
 
        /*
         * For now, we report if PG_reserved was found set, but do not
@@ -526,7 +558,8 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order)
                rmv_page_order(page);
                area->nr_free--;
                zone->free_pages -= 1UL << order;
-               return expand(zone, page, order, current_order, area);
+               expand(zone, page, order, current_order, area);
+               return page;
        }
 
        return NULL;
@@ -540,21 +573,17 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order)
 static int rmqueue_bulk(struct zone *zone, unsigned int order, 
                        unsigned long count, struct list_head *list)
 {
-       unsigned long flags;
        int i;
-       int allocated = 0;
-       struct page *page;
        
-       spin_lock_irqsave(&zone->lock, flags);
+       spin_lock(&zone->lock);
        for (i = 0; i < count; ++i) {
-               page = __rmqueue(zone, order);
-               if (page == NULL)
+               struct page *page = __rmqueue(zone, order);
+               if (unlikely(page == NULL))
                        break;
-               allocated++;
                list_add_tail(&page->lru, list);
        }
-       spin_unlock_irqrestore(&zone->lock, flags);
-       return allocated;
+       spin_unlock(&zone->lock);
+       return i;
 }
 
 #ifdef CONFIG_NUMA
@@ -573,14 +602,13 @@ void drain_remote_pages(void)
                if (zone->zone_pgdat->node_id == numa_node_id())
                        continue;
 
-               pset = zone->pageset[smp_processor_id()];
+               pset = zone_pcp(zone, smp_processor_id());
                for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
                        struct per_cpu_pages *pcp;
 
                        pcp = &pset->pcp[i];
-                       if (pcp->count)
-                               pcp->count -= free_pages_bulk(zone, pcp->count,
-                                               &pcp->list, 0);
+                       free_pages_bulk(zone, pcp->count, &pcp->list, 0);
+                       pcp->count = 0;
                }
        }
        local_irq_restore(flags);
@@ -590,6 +618,7 @@ void drain_remote_pages(void)
 #if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU)
 static void __drain_pages(unsigned int cpu)
 {
+       unsigned long flags;
        struct zone *zone;
        int i;
 
@@ -601,8 +630,10 @@ static void __drain_pages(unsigned int cpu)
                        struct per_cpu_pages *pcp;
 
                        pcp = &pset->pcp[i];
-                       pcp->count -= free_pages_bulk(zone, pcp->count,
-                                               &pcp->list, 0);
+                       local_irq_save(flags);
+                       free_pages_bulk(zone, pcp->count, &pcp->list, 0);
+                       pcp->count = 0;
+                       local_irq_restore(flags);
                }
        }
 }
@@ -648,18 +679,14 @@ void drain_local_pages(void)
 }
 #endif /* CONFIG_PM */
 
-static void zone_statistics(struct zonelist *zonelist, struct zone *z)
+static void zone_statistics(struct zonelist *zonelist, struct zone *z, int cpu)
 {
 #ifdef CONFIG_NUMA
-       unsigned long flags;
-       int cpu;
        pg_data_t *pg = z->zone_pgdat;
        pg_data_t *orig = zonelist->zones[0]->zone_pgdat;
        struct per_cpu_pageset *p;
 
-       local_irq_save(flags);
-       cpu = smp_processor_id();
-       p = zone_pcp(z,cpu);
+       p = zone_pcp(z, cpu);
        if (pg == orig) {
                p->numa_hit++;
        } else {
@@ -670,14 +697,12 @@ static void zone_statistics(struct zonelist *zonelist, struct zone *z)
                p->local_node++;
        else
                p->other_node++;
-       local_irq_restore(flags);
 #endif
 }
 
 /*
  * Free a 0-order page
  */
-static void FASTCALL(free_hot_cold_page(struct page *page, int cold));
 static void fastcall free_hot_cold_page(struct page *page, int cold)
 {
        struct zone *zone = page_zone(page);
@@ -689,18 +714,20 @@ static void fastcall free_hot_cold_page(struct page *page, int cold)
 
        if (PageAnon(page))
                page->mapping = NULL;
-       if (free_pages_check(__FUNCTION__, page))
+       if (free_pages_check(page))
                return;
 
-       inc_page_state(pgfree);
        kernel_map_pages(page, 1, 0);
 
        pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
        local_irq_save(flags);
+       __inc_page_state(pgfree);
        list_add(&page->lru, &pcp->list);
        pcp->count++;
-       if (pcp->count >= pcp->high)
-               pcp->count -= free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+       if (pcp->count >= pcp->high) {
+               free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+               pcp->count -= pcp->batch;
+       }
        local_irq_restore(flags);
        put_cpu();
 }
@@ -729,49 +756,58 @@ static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags)
  * we cheat by calling it from here, in the order > 0 path.  Saves a branch
  * or two.
  */
-static struct page *
-buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags)
+static struct page *buffered_rmqueue(struct zonelist *zonelist,
+                       struct zone *zone, int order, gfp_t gfp_flags)
 {
        unsigned long flags;
        struct page *page;
        int cold = !!(gfp_flags & __GFP_COLD);
+       int cpu;
 
 again:
-       if (order == 0) {
+       cpu  = get_cpu();
+       if (likely(order == 0)) {
                struct per_cpu_pages *pcp;
 
-               page = NULL;
-               pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
+               pcp = &zone_pcp(zone, cpu)->pcp[cold];
                local_irq_save(flags);
-               if (pcp->count <= pcp->low)
+               if (!pcp->count) {
                        pcp->count += rmqueue_bulk(zone, 0,
                                                pcp->batch, &pcp->list);
-               if (pcp->count) {
-                       page = list_entry(pcp->list.next, struct page, lru);
-                       list_del(&page->lru);
-                       pcp->count--;
+                       if (unlikely(!pcp->count))
+                               goto failed;
                }
-               local_irq_restore(flags);
-               put_cpu();
+               page = list_entry(pcp->list.next, struct page, lru);
+               list_del(&page->lru);
+               pcp->count--;
        } else {
                spin_lock_irqsave(&zone->lock, flags);
                page = __rmqueue(zone, order);
-               spin_unlock_irqrestore(&zone->lock, flags);
+               spin_unlock(&zone->lock);
+               if (!page)
+                       goto failed;
        }
 
-       if (page != NULL) {
-               BUG_ON(bad_range(zone, page));
-               mod_page_state_zone(zone, pgalloc, 1 << order);
-               if (prep_new_page(page, order))
-                       goto again;
+       __mod_page_state_zone(zone, pgalloc, 1 << order);
+       zone_statistics(zonelist, zone, cpu);
+       local_irq_restore(flags);
+       put_cpu();
+
+       BUG_ON(bad_range(zone, page));
+       if (prep_new_page(page, order))
+               goto again;
 
-               if (gfp_flags & __GFP_ZERO)
-                       prep_zero_page(page, order, gfp_flags);
+       if (gfp_flags & __GFP_ZERO)
+               prep_zero_page(page, order, gfp_flags);
 
-               if (order && (gfp_flags & __GFP_COMP))
-                       prep_compound_page(page, order);
-       }
+       if (order && (gfp_flags & __GFP_COMP))
+               prep_compound_page(page, order);
        return page;
+
+failed:
+       local_irq_restore(flags);
+       put_cpu();
+       return NULL;
 }
 
 #define ALLOC_NO_WATERMARKS    0x01 /* don't check watermarks at all */
@@ -844,12 +880,13 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
                                mark = (*z)->pages_high;
                        if (!zone_watermark_ok(*z, order, mark,
                                    classzone_idx, alloc_flags))
-                               continue;
+                               if (!zone_reclaim_mode ||
+                                   !zone_reclaim(*z, gfp_mask, order))
+                                       continue;
                }
 
-               page = buffered_rmqueue(*z, order, gfp_mask);
+               page = buffered_rmqueue(zonelist, *z, order, gfp_mask);
                if (page) {
-                       zone_statistics(zonelist, *z);
                        break;
                }
        } while (*(++z) != NULL);
@@ -898,15 +935,15 @@ restart:
         *
         * The caller may dip into page reserves a bit more if the caller
         * cannot run direct reclaim, or if the caller has realtime scheduling
-        * policy.
+        * policy or is asking for __GFP_HIGH memory.  GFP_ATOMIC requests will
+        * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH).
         */
        alloc_flags = ALLOC_WMARK_MIN;
        if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
                alloc_flags |= ALLOC_HARDER;
        if (gfp_mask & __GFP_HIGH)
                alloc_flags |= ALLOC_HIGH;
-       if (wait)
-               alloc_flags |= ALLOC_CPUSET;
+       alloc_flags |= ALLOC_CPUSET;
 
        /*
         * Go through the zonelist again. Let __GFP_HIGH and allocations
@@ -928,7 +965,7 @@ restart:
 nofail_alloc:
                        /* go through the zonelist yet again, ignoring mins */
                        page = get_page_from_freelist(gfp_mask, order,
-                               zonelist, ALLOC_NO_WATERMARKS|ALLOC_CPUSET);
+                               zonelist, ALLOC_NO_WATERMARKS);
                        if (page)
                                goto got_pg;
                        if (gfp_mask & __GFP_NOFAIL) {
@@ -947,6 +984,7 @@ rebalance:
        cond_resched();
 
        /* We now go into synchronous reclaim */
+       cpuset_memory_pressure_bump();
        p->flags |= PF_MEMALLOC;
        reclaim_state.reclaimed_slab = 0;
        p->reclaim_state = &reclaim_state;
@@ -1173,7 +1211,7 @@ EXPORT_SYMBOL(nr_pagecache);
 DEFINE_PER_CPU(long, nr_pagecache_local) = 0;
 #endif
 
-void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
+static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
 {
        int cpu = 0;
 
@@ -1226,7 +1264,7 @@ void get_full_page_state(struct page_state *ret)
        __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long), &mask);
 }
 
-unsigned long __read_page_state(unsigned long offset)
+unsigned long read_page_state_offset(unsigned long offset)
 {
        unsigned long ret = 0;
        int cpu;
@@ -1240,18 +1278,26 @@ unsigned long __read_page_state(unsigned long offset)
        return ret;
 }
 
-void __mod_page_state(unsigned long offset, unsigned long delta)
+void __mod_page_state_offset(unsigned long offset, unsigned long delta)
+{
+       void *ptr;
+
+       ptr = &__get_cpu_var(page_states);
+       *(unsigned long *)(ptr + offset) += delta;
+}
+EXPORT_SYMBOL(__mod_page_state_offset);
+
+void mod_page_state_offset(unsigned long offset, unsigned long delta)
 {
        unsigned long flags;
-       voidptr;
+       void *ptr;
 
        local_irq_save(flags);
        ptr = &__get_cpu_var(page_states);
-       *(unsigned long*)(ptr + offset) += delta;
+       *(unsigned long *)(ptr + offset) += delta;
        local_irq_restore(flags);
 }
-
-EXPORT_SYMBOL(__mod_page_state);
+EXPORT_SYMBOL(mod_page_state_offset);
 
 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
                        unsigned long *free, struct pglist_data *pgdat)
@@ -1337,7 +1383,7 @@ void show_free_areas(void)
                show_node(zone);
                printk("%s per-cpu:", zone->name);
 
-               if (!zone->present_pages) {
+               if (!populated_zone(zone)) {
                        printk(" empty\n");
                        continue;
                } else
@@ -1349,10 +1395,9 @@ void show_free_areas(void)
                        pageset = zone_pcp(zone, cpu);
 
                        for (temperature = 0; temperature < 2; temperature++)
-                               printk("cpu %d %s: low %d, high %d, batch %d used:%d\n",
+                               printk("cpu %d %s: high %d, batch %d used:%d\n",
                                        cpu,
                                        temperature ? "cold" : "hot",
-                                       pageset->pcp[temperature].low,
                                        pageset->pcp[temperature].high,
                                        pageset->pcp[temperature].batch,
                                        pageset->pcp[temperature].count);
@@ -1415,7 +1460,7 @@ void show_free_areas(void)
 
                show_node(zone);
                printk("%s: ", zone->name);
-               if (!zone->present_pages) {
+               if (!populated_zone(zone)) {
                        printk("empty\n");
                        continue;
                }
@@ -1435,36 +1480,29 @@ void show_free_areas(void)
 
 /*
  * Builds allocation fallback zone lists.
+ *
+ * Add all populated zones of a node to the zonelist.
  */
-static int __init build_zonelists_node(pg_data_t *pgdat, struct zonelist *zonelist, int j, int k)
-{
-       switch (k) {
-               struct zone *zone;
-       default:
-               BUG();
-       case ZONE_HIGHMEM:
-               zone = pgdat->node_zones + ZONE_HIGHMEM;
-               if (zone->present_pages) {
+static int __init build_zonelists_node(pg_data_t *pgdat,
+                       struct zonelist *zonelist, int nr_zones, int zone_type)
+{
+       struct zone *zone;
+
+       BUG_ON(zone_type > ZONE_HIGHMEM);
+
+       do {
+               zone = pgdat->node_zones + zone_type;
+               if (populated_zone(zone)) {
 #ifndef CONFIG_HIGHMEM
-                       BUG();
+                       BUG_ON(zone_type > ZONE_NORMAL);
 #endif
-                       zonelist->zones[j++] = zone;
+                       zonelist->zones[nr_zones++] = zone;
+                       check_highest_zone(zone_type);
                }
-       case ZONE_NORMAL:
-               zone = pgdat->node_zones + ZONE_NORMAL;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       case ZONE_DMA32:
-               zone = pgdat->node_zones + ZONE_DMA32;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       case ZONE_DMA:
-               zone = pgdat->node_zones + ZONE_DMA;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       }
+               zone_type--;
 
-       return j;
+       } while (zone_type >= 0);
+       return nr_zones;
 }
 
 static inline int highest_zone(int zone_bits)
@@ -1561,13 +1599,22 @@ static void __init build_zonelists(pg_data_t *pgdat)
        prev_node = local_node;
        nodes_clear(used_mask);
        while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {
+               int distance = node_distance(local_node, node);
+
+               /*
+                * If another node is sufficiently far away then it is better
+                * to reclaim pages in a zone before going off node.
+                */
+               if (distance > RECLAIM_DISTANCE)
+                       zone_reclaim_mode = 1;
+
                /*
                 * We don't want to pressure a particular node.
                 * So adding penalty to the first node in same
                 * distance group to make it round-robin.
                 */
-               if (node_distance(local_node, node) !=
-                               node_distance(local_node, prev_node))
+
+               if (distance != node_distance(local_node, prev_node))
                        node_load[node] += load;
                prev_node = node;
                load--;
@@ -1701,18 +1748,16 @@ static void __init calculate_zone_totalpages(struct pglist_data *pgdat,
  * up by free_all_bootmem() once the early boot process is
  * done. Non-atomic initialization, single-pass.
  */
-void __devinit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
+void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
                unsigned long start_pfn)
 {
        struct page *page;
        unsigned long end_pfn = start_pfn + size;
        unsigned long pfn;
 
-       for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
+       for (pfn = start_pfn; pfn < end_pfn; pfn++) {
                if (!early_pfn_valid(pfn))
                        continue;
-               if (!early_pfn_in_nid(pfn, nid))
-                       continue;
                page = pfn_to_page(pfn);
                set_page_links(page, zone, nid, pfn);
                set_page_count(page, 1);
@@ -1756,7 +1801,7 @@ void zonetable_add(struct zone *zone, int nid, int zid, unsigned long pfn,
        memmap_init_zone((size), (nid), (zone), (start_pfn))
 #endif
 
-static int __devinit zone_batchsize(struct zone *zone)
+static int __meminit zone_batchsize(struct zone *zone)
 {
        int batch;
 
@@ -1796,19 +1841,35 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch)
 
        pcp = &p->pcp[0];               /* hot */
        pcp->count = 0;
-       pcp->low = 0;
        pcp->high = 6 * batch;
        pcp->batch = max(1UL, 1 * batch);
        INIT_LIST_HEAD(&pcp->list);
 
        pcp = &p->pcp[1];               /* cold*/
        pcp->count = 0;
-       pcp->low = 0;
        pcp->high = 2 * batch;
        pcp->batch = max(1UL, batch/2);
        INIT_LIST_HEAD(&pcp->list);
 }
 
+/*
+ * setup_pagelist_highmark() sets the high water mark for hot per_cpu_pagelist
+ * to the value high for the pageset p.
+ */
+
+static void setup_pagelist_highmark(struct per_cpu_pageset *p,
+                               unsigned long high)
+{
+       struct per_cpu_pages *pcp;
+
+       pcp = &p->pcp[0]; /* hot list */
+       pcp->high = high;
+       pcp->batch = max(1UL, high/4);
+       if ((high/4) > (PAGE_SHIFT * 8))
+               pcp->batch = PAGE_SHIFT * 8;
+}
+
+
 #ifdef CONFIG_NUMA
 /*
  * Boot pageset table. One per cpu which is going to be used for all
@@ -1834,18 +1895,22 @@ static struct per_cpu_pageset
  * Dynamically allocate memory for the
  * per cpu pageset array in struct zone.
  */
-static int __devinit process_zones(int cpu)
+static int __meminit process_zones(int cpu)
 {
        struct zone *zone, *dzone;
 
        for_each_zone(zone) {
 
-               zone->pageset[cpu] = kmalloc_node(sizeof(struct per_cpu_pageset),
+               zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct per_cpu_pageset),
                                         GFP_KERNEL, cpu_to_node(cpu));
-               if (!zone->pageset[cpu])
+               if (!zone_pcp(zone, cpu))
                        goto bad;
 
-               setup_pageset(zone->pageset[cpu], zone_batchsize(zone));
+               setup_pageset(zone_pcp(zone, cpu), zone_batchsize(zone));
+
+               if (percpu_pagelist_fraction)
+                       setup_pagelist_highmark(zone_pcp(zone, cpu),
+                               (zone->present_pages / percpu_pagelist_fraction));
        }
 
        return 0;
@@ -1853,15 +1918,14 @@ bad:
        for_each_zone(dzone) {
                if (dzone == zone)
                        break;
-               kfree(dzone->pageset[cpu]);
-               dzone->pageset[cpu] = NULL;
+               kfree(zone_pcp(dzone, cpu));
+               zone_pcp(dzone, cpu) = NULL;
        }
        return -ENOMEM;
 }
 
 static inline void free_zone_pagesets(int cpu)
 {
-#ifdef CONFIG_NUMA
        struct zone *zone;
 
        for_each_zone(zone) {
@@ -1870,10 +1934,9 @@ static inline void free_zone_pagesets(int cpu)
                zone_pcp(zone, cpu) = NULL;
                kfree(pset);
        }
-#endif
 }
 
-static int __devinit pageset_cpuup_callback(struct notifier_block *nfb,
+static int __meminit pageset_cpuup_callback(struct notifier_block *nfb,
                unsigned long action,
                void *hcpu)
 {
@@ -1913,7 +1976,7 @@ void __init setup_per_cpu_pageset(void)
 
 #endif
 
-static __devinit
+static __meminit
 void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
 {
        int i;
@@ -1933,7 +1996,7 @@ void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
                init_waitqueue_head(zone->wait_table + i);
 }
 
-static __devinit void zone_pcp_init(struct zone *zone)
+static __meminit void zone_pcp_init(struct zone *zone)
 {
        int cpu;
        unsigned long batch = zone_batchsize(zone);
@@ -1941,7 +2004,7 @@ static __devinit void zone_pcp_init(struct zone *zone)
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
 #ifdef CONFIG_NUMA
                /* Early boot. Slab allocator not functional yet */
-               zone->pageset[cpu] = &boot_pageset[cpu];
+               zone_pcp(zone, cpu) = &boot_pageset[cpu];
                setup_pageset(&boot_pageset[cpu],0);
 #else
                setup_pageset(zone_pcp(zone,cpu), batch);
@@ -1951,7 +2014,7 @@ static __devinit void zone_pcp_init(struct zone *zone)
                zone->name, zone->present_pages, batch);
 }
 
-static __devinit void init_currently_empty_zone(struct zone *zone,
+static __meminit void init_currently_empty_zone(struct zone *zone,
                unsigned long zone_start_pfn, unsigned long size)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
@@ -2118,7 +2181,7 @@ static int frag_show(struct seq_file *m, void *arg)
        int order;
 
        for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
-               if (!zone->present_pages)
+               if (!populated_zone(zone))
                        continue;
 
                spin_lock_irqsave(&zone->lock, flags);
@@ -2151,7 +2214,7 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
        for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; zone++) {
                int i;
 
-               if (!zone->present_pages)
+               if (!populated_zone(zone))
                        continue;
 
                spin_lock_irqsave(&zone->lock, flags);
@@ -2184,7 +2247,7 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
                seq_printf(m,
                           ")"
                           "\n  pagesets");
-               for (i = 0; i < ARRAY_SIZE(zone->pageset); i++) {
+               for_each_online_cpu(i) {
                        struct per_cpu_pageset *pageset;
                        int j;
 
@@ -2199,12 +2262,10 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
                                seq_printf(m,
                                           "\n    cpu: %i pcp: %i"
                                           "\n              count: %i"
-                                          "\n              low:   %i"
                                           "\n              high:  %i"
                                           "\n              batch: %i",
                                           i, j,
                                           pageset->pcp[j].count,
-                                          pageset->pcp[j].low,
                                           pageset->pcp[j].high,
                                           pageset->pcp[j].batch);
                        }
@@ -2259,32 +2320,40 @@ static char *vmstat_text[] = {
        "pgpgout",
        "pswpin",
        "pswpout",
-       "pgalloc_high",
 
+       "pgalloc_high",
        "pgalloc_normal",
+       "pgalloc_dma32",
        "pgalloc_dma",
+
        "pgfree",
        "pgactivate",
        "pgdeactivate",
 
        "pgfault",
        "pgmajfault",
+
        "pgrefill_high",
        "pgrefill_normal",
+       "pgrefill_dma32",
        "pgrefill_dma",
 
        "pgsteal_high",
        "pgsteal_normal",
+       "pgsteal_dma32",
        "pgsteal_dma",
+
        "pgscan_kswapd_high",
        "pgscan_kswapd_normal",
-
+       "pgscan_kswapd_dma32",
        "pgscan_kswapd_dma",
+
        "pgscan_direct_high",
        "pgscan_direct_normal",
+       "pgscan_direct_dma32",
        "pgscan_direct_dma",
-       "pginodesteal",
 
+       "pginodesteal",
        "slabs_scanned",
        "kswapd_steal",
        "kswapd_inodesteal",
@@ -2541,6 +2610,32 @@ int lowmem_reserve_ratio_sysctl_handler(ctl_table *table, int write,
        return 0;
 }
 
+/*
+ * percpu_pagelist_fraction - changes the pcp->high for each zone on each
+ * cpu.  It is the fraction of total pages in each zone that a hot per cpu pagelist
+ * can have before it gets flushed back to buddy allocator.
+ */
+
+int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
+       struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
+{
+       struct zone *zone;
+       unsigned int cpu;
+       int ret;
+
+       ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
+       if (!write || (ret == -EINVAL))
+               return ret;
+       for_each_zone(zone) {
+               for_each_online_cpu(cpu) {
+                       unsigned long  high;
+                       high = zone->present_pages / percpu_pagelist_fraction;
+                       setup_pagelist_highmark(zone_pcp(zone, cpu), high);
+               }
+       }
+       return 0;
+}
+
 __initdata int hashdist = HASHDIST_DEFAULT;
 
 #ifdef CONFIG_NUMA
index e8811d2bdb73144348a90a7529088167855d4a0f..bf4452e1fe1c14f8dababddb5aa0ab5181342427 100644 (file)
@@ -75,6 +75,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <linux/bitops.h>
+#include <linux/capability.h>
 #include <linux/config.h>
 #include <linux/cpu.h>
 #include <linux/types.h>
@@ -632,7 +633,7 @@ struct net_device * dev_get_by_flags(unsigned short if_flags, unsigned short mas
  *     Network device names need to be valid file names to
  *     to allow sysfs to work
  */
-static int dev_valid_name(const char *name)
+int dev_valid_name(const char *name)
 {
        return !(*name == '\0' 
                 || !strcmp(name, ".")
@@ -1098,15 +1099,12 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
                        goto out;
        }
 
-       if (offset > (int)skb->len)
-               BUG();
+       BUG_ON(offset > (int)skb->len);
        csum = skb_checksum(skb, offset, skb->len-offset, 0);
 
        offset = skb->tail - skb->h.raw;
-       if (offset <= 0)
-               BUG();
-       if (skb->csum + 2 > offset)
-               BUG();
+       BUG_ON(offset <= 0);
+       BUG_ON(skb->csum + 2 > offset);
 
        *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
        skb->ip_summed = CHECKSUM_NONE;
@@ -3320,13 +3318,13 @@ EXPORT_SYMBOL(__dev_get_by_index);
 EXPORT_SYMBOL(__dev_get_by_name);
 EXPORT_SYMBOL(__dev_remove_pack);
 EXPORT_SYMBOL(__skb_linearize);
+EXPORT_SYMBOL(dev_valid_name);
 EXPORT_SYMBOL(dev_add_pack);
 EXPORT_SYMBOL(dev_alloc_name);
 EXPORT_SYMBOL(dev_close);
 EXPORT_SYMBOL(dev_get_by_flags);
 EXPORT_SYMBOL(dev_get_by_index);
 EXPORT_SYMBOL(dev_get_by_name);
-EXPORT_SYMBOL(dev_ioctl);
 EXPORT_SYMBOL(dev_open);
 EXPORT_SYMBOL(dev_queue_xmit);
 EXPORT_SYMBOL(dev_remove_pack);
index 7cd17430e292f6bb25b1d3689fa12834e7e5318b..976e5ab1dfcb5df1e7703d6258f2715cdfe2a1eb 100644 (file)
@@ -136,17 +136,13 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
 struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
                            int fclone)
 {
+       struct skb_shared_info *shinfo;
        struct sk_buff *skb;
        u8 *data;
 
        /* Get the HEAD */
-       if (fclone)
-               skb = kmem_cache_alloc(skbuff_fclone_cache,
-                                      gfp_mask & ~__GFP_DMA);
-       else
-               skb = kmem_cache_alloc(skbuff_head_cache,
-                                      gfp_mask & ~__GFP_DMA);
-
+       skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
+                               gfp_mask & ~__GFP_DMA);
        if (!skb)
                goto out;
 
@@ -163,6 +159,16 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
        skb->data = data;
        skb->tail = data;
        skb->end  = data + size;
+       /* make sure we initialize shinfo sequentially */
+       shinfo = skb_shinfo(skb);
+       atomic_set(&shinfo->dataref, 1);
+       shinfo->nr_frags  = 0;
+       shinfo->tso_size = 0;
+       shinfo->tso_segs = 0;
+       shinfo->ufo_size = 0;
+       shinfo->ip6_frag_id = 0;
+       shinfo->frag_list = NULL;
+
        if (fclone) {
                struct sk_buff *child = skb + 1;
                atomic_t *fclone_ref = (atomic_t *) (child + 1);
@@ -172,20 +178,10 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
 
                child->fclone = SKB_FCLONE_UNAVAILABLE;
        }
-       atomic_set(&(skb_shinfo(skb)->dataref), 1);
-       skb_shinfo(skb)->nr_frags  = 0;
-       skb_shinfo(skb)->tso_size = 0;
-       skb_shinfo(skb)->tso_segs = 0;
-       skb_shinfo(skb)->frag_list = NULL;
-       skb_shinfo(skb)->ufo_size = 0;
-       skb_shinfo(skb)->ip6_frag_id = 0;
 out:
        return skb;
 nodata:
-       if (fclone)
-               kmem_cache_free(skbuff_fclone_cache, skb);
-       else
-               kmem_cache_free(skbuff_head_cache, skb);
+       kmem_cache_free(fclone ? skbuff_fclone_cache : skbuff_head_cache, skb);
        skb = NULL;
        goto out;
 }
@@ -210,17 +206,13 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
                                     gfp_t gfp_mask,
                                     int fclone)
 {
+       struct skb_shared_info *shinfo;
        struct sk_buff *skb;
        u8 *data;
 
        /* Get the HEAD */
-       if (fclone)
-               skb = kmem_cache_alloc(skbuff_fclone_cache,
-                                      gfp_mask & ~__GFP_DMA);
-       else
-               skb = kmem_cache_alloc(skbuff_head_cache,
-                                      gfp_mask & ~__GFP_DMA);
-
+       skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
+                               gfp_mask & ~__GFP_DMA);
        if (!skb)
                goto out;
 
@@ -237,6 +229,16 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
        skb->data = data;
        skb->tail = data;
        skb->end  = data + size;
+       /* make sure we initialize shinfo sequentially */
+       shinfo = skb_shinfo(skb);
+       atomic_set(&shinfo->dataref, 1);
+       shinfo->nr_frags  = 0;
+       shinfo->tso_size = 0;
+       shinfo->tso_segs = 0;
+       shinfo->ufo_size = 0;
+       shinfo->ip6_frag_id = 0;
+       shinfo->frag_list = NULL;
+
        if (fclone) {
                struct sk_buff *child = skb + 1;
                atomic_t *fclone_ref = (atomic_t *) (child + 1);
@@ -246,20 +248,10 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
 
                child->fclone = SKB_FCLONE_UNAVAILABLE;
        }
-       atomic_set(&(skb_shinfo(skb)->dataref), 1);
-       skb_shinfo(skb)->nr_frags  = 0;
-       skb_shinfo(skb)->tso_size = 0;
-       skb_shinfo(skb)->tso_segs = 0;
-       skb_shinfo(skb)->frag_list = NULL;
-       skb_shinfo(skb)->ufo_size = 0;
-       skb_shinfo(skb)->ip6_frag_id = 0;
 out:
        return skb;
 nodata:
-       if (fclone)
-               kmem_cache_free(skbuff_fclone_cache, skb);
-       else
-               kmem_cache_free(skbuff_head_cache, skb);
+       kmem_cache_free(fclone ? skbuff_fclone_cache : skbuff_head_cache, skb);
        skb = NULL;
        goto out;
 }
@@ -820,8 +812,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
                int end = offset + skb_shinfo(skb)->frags[i].size;
                if (end > len) {
                        if (skb_cloned(skb)) {
-                               if (!realloc)
-                                       BUG();
+                               BUG_ON(!realloc);
                                if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
                                        return -ENOMEM;
                        }
@@ -923,8 +914,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
                struct sk_buff *insp = NULL;
 
                do {
-                       if (!list)
-                               BUG();
+                       BUG_ON(!list);
 
                        if (list->len <= eat) {
                                /* Eaten as whole. */
@@ -1228,8 +1218,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
 
        return csum;
 }
@@ -1311,8 +1300,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
        return csum;
 }
 
@@ -1326,8 +1314,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
        else
                csstart = skb_headlen(skb);
 
-       if (csstart > skb_headlen(skb))
-               BUG();
+       BUG_ON(csstart > skb_headlen(skb));
 
        memcpy(to, skb->data, csstart);
 
diff --git a/patches/linux-2.6.15/i386-mach-io-check-nmi.patch b/patches/linux-2.6.15/i386-mach-io-check-nmi.patch
deleted file mode 100644 (file)
index 990e358..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/traps.c  2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/traps.c 2006-02-02 17:14:26.000000000 +0000
-@@ -533,18 +533,11 @@ static void mem_parity_error(unsigned ch
- static void io_check_error(unsigned char reason, struct pt_regs * regs)
- {
--      unsigned long i;
--
-       printk("NMI: IOCK error (debug interrupt?)\n");
-       show_registers(regs);
-       /* Re-enable the IOCK line, wait for a few seconds */
--      reason = (reason & 0xf) | 8;
--      outb(reason, 0x61);
--      i = 2000;
--      while (--i) udelay(1000);
--      reason &= ~8;
--      outb(reason, 0x61);
-+      clear_io_check_error(reason);
- }
- static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h
---- ../pristine-linux-2.6.15/include/asm-i386/mach-default/mach_traps.h        2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/mach-default/mach_traps.h       2006-02-02 17:14:26.000000000 +0000
-@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
-       outb(reason, 0x61);
- }
-+static inline void clear_io_check_error(unsigned char reason)
-+{
-+      unsigned long i;
-+
-+      reason = (reason & 0xf) | 8;
-+      outb(reason, 0x61);
-+      i = 2000;
-+      while (--i) udelay(1000);
-+      reason &= ~8;
-+      outb(reason, 0x61);
-+}
-+
- static inline unsigned char get_nmi_reason(void)
- {
-       return inb(0x61);
diff --git a/patches/linux-2.6.15/net-csum.patch b/patches/linux-2.6.15/net-csum.patch
deleted file mode 100644 (file)
index 9a5e62a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
---- ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_tcp.c     2006-01-03 03:21:10.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c    2006-02-02 17:14:59.000000000 +0000
-@@ -129,10 +129,16 @@ tcp_manip_pkt(struct sk_buff **pskb,
-       if (hdrsize < sizeof(*hdr))
-               return 1;
--      hdr->check = ip_nat_cheat_check(~oldip, newip,
-+      if ((*pskb)->proto_csum_blank) {
-+              hdr->check = ip_nat_cheat_check(oldip, ~newip,
-+                              ip_nat_cheat_check(oldport ^ 0xFFFF,
-+                                      newport, hdr->check));
-+      } else { 
-+              hdr->check = ip_nat_cheat_check(~oldip, newip,
-                                       ip_nat_cheat_check(oldport ^ 0xFFFF,
-                                                          newport,
-                                                          hdr->check));
-+      }
-       return 1;
- }
-diff -pruN ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
---- ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_udp.c     2006-01-03 03:21:10.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c    2006-02-02 17:14:59.000000000 +0000
-@@ -113,11 +113,19 @@ udp_manip_pkt(struct sk_buff **pskb,
-               newport = tuple->dst.u.udp.port;
-               portptr = &hdr->dest;
-       }
--      if (hdr->check) /* 0 is a special case meaning no checksum */
--              hdr->check = ip_nat_cheat_check(~oldip, newip,
-+      
-+      if (hdr->check) { /* 0 is a special case meaning no checksum */
-+              if ((*pskb)->proto_csum_blank) {
-+                      hdr->check = ip_nat_cheat_check(oldip, ~newip, 
-+                                      ip_nat_cheat_check(*portptr ^ 0xFFFF, 
-+                                              newport, hdr->check));
-+              } else {
-+                      hdr->check = ip_nat_cheat_check(~oldip, newip,
-                                       ip_nat_cheat_check(*portptr ^ 0xFFFF,
-                                                          newport,
-                                                          hdr->check));
-+              }
-+      }
-       *portptr = newport;
-       return 1;
- }
diff --git a/patches/linux-2.6.15/pmd-shared.patch b/patches/linux-2.6.15/pmd-shared.patch
deleted file mode 100644 (file)
index 053e987..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c
---- ../pristine-linux-2.6.15/arch/i386/mm/pageattr.c   2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/mm/pageattr.c  2006-02-02 17:15:14.000000000 +0000
-@@ -76,7 +76,7 @@ static void set_pmd_pte(pte_t *kpte, uns
-       unsigned long flags;
-       set_pte_atomic(kpte, pte);      /* change init_mm */
--      if (PTRS_PER_PMD > 1)
-+      if (HAVE_SHARED_KERNEL_PMD)
-               return;
-       spin_lock_irqsave(&pgd_lock, flags);
-diff -pruN ../pristine-linux-2.6.15/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
---- ../pristine-linux-2.6.15/arch/i386/mm/pgtable.c    2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/mm/pgtable.c   2006-02-02 17:15:14.000000000 +0000
-@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
-               spin_lock_irqsave(&pgd_lock, flags);
-       }
--      clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
--                      swapper_pg_dir + USER_PTRS_PER_PGD,
--                      KERNEL_PGD_PTRS);
-+      if (PTRS_PER_PMD == 1 || HAVE_SHARED_KERNEL_PMD)
-+              clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
-+                              swapper_pg_dir + USER_PTRS_PER_PGD,
-+                              KERNEL_PGD_PTRS);
-       if (PTRS_PER_PMD > 1)
-               return;
-@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
-                       goto out_oom;
-               set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
-       }
-+
-+      if (!HAVE_SHARED_KERNEL_PMD) {
-+              unsigned long flags;
-+
-+              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                      pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
-+                      if (!pmd)
-+                              goto out_oom;
-+                      set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
-+              }
-+
-+              spin_lock_irqsave(&pgd_lock, flags);
-+              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                      unsigned long v = (unsigned long)i << PGDIR_SHIFT;
-+                      pgd_t *kpgd = pgd_offset_k(v);
-+                      pud_t *kpud = pud_offset(kpgd, v);
-+                      pmd_t *kpmd = pmd_offset(kpud, v);
-+                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                      memcpy(pmd, kpmd, PAGE_SIZE);
-+              }
-+              pgd_list_add(pgd);
-+              spin_unlock_irqrestore(&pgd_lock, flags);
-+      }
-+
-       return pgd;
- out_oom:
-@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
-       int i;
-       /* in the PAE case user pgd entries are overwritten before usage */
--      if (PTRS_PER_PMD > 1)
--              for (i = 0; i < USER_PTRS_PER_PGD; ++i)
--                      kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
-+      if (PTRS_PER_PMD > 1) {
-+              for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
-+                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                      kmem_cache_free(pmd_cache, pmd);
-+              }
-+              if (!HAVE_SHARED_KERNEL_PMD) {
-+                      unsigned long flags;
-+                      spin_lock_irqsave(&pgd_lock, flags);
-+                      pgd_list_del(pgd);
-+                      spin_unlock_irqrestore(&pgd_lock, flags);
-+                      for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                              pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                              memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
-+                              kmem_cache_free(pmd_cache, pmd);
-+                      }
-+              }
-+      }
-       /* in the non-PAE case, free_pgtables() clears user pgd entries */
-       kmem_cache_free(pgd_cache, pgd);
- }
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h
---- ../pristine-linux-2.6.15/include/asm-i386/pgtable-2level-defs.h    2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/pgtable-2level-defs.h   2006-02-02 17:15:14.000000000 +0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
- #define _I386_PGTABLE_2LEVEL_DEFS_H
-+#define HAVE_SHARED_KERNEL_PMD 0
-+
- /*
-  * traditional i386 two-level paging structure:
-  */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h
---- ../pristine-linux-2.6.15/include/asm-i386/pgtable-3level-defs.h    2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/pgtable-3level-defs.h   2006-02-02 17:15:14.000000000 +0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
- #define _I386_PGTABLE_3LEVEL_DEFS_H
-+#define HAVE_SHARED_KERNEL_PMD 1
-+
- /*
-  * PGDIR_SHIFT determines what a top-level page table entry can map
-  */
diff --git a/patches/linux-2.6.15/smp-alts.patch b/patches/linux-2.6.15/smp-alts.patch
deleted file mode 100644 (file)
index 9389616..0000000
+++ /dev/null
@@ -1,593 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/Kconfig ./arch/i386/Kconfig
---- ../pristine-linux-2.6.15/arch/i386/Kconfig 2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/Kconfig        2006-02-02 17:09:58.000000000 +0000
-@@ -202,6 +202,19 @@ config SMP
-         If you don't know what to do here, say N.
-+config SMP_ALTERNATIVES
-+      bool "SMP alternatives support (EXPERIMENTAL)"
-+      depends on SMP && EXPERIMENTAL
-+      help
-+        Try to reduce the overhead of running an SMP kernel on a uniprocessor
-+        host slightly by replacing certain key instruction sequences
-+        according to whether we currently have more than one CPU available.
-+        This should provide a noticeable boost to performance when
-+        running SMP kernels on UP machines, and have negligible impact
-+        when running on an true SMP host.
-+
-+          If unsure, say N.
-+        
- config NR_CPUS
-       int "Maximum number of CPUs (2-255)"
-       range 2 255
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/Makefile ./arch/i386/kernel/Makefile
---- ../pristine-linux-2.6.15/arch/i386/kernel/Makefile 2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/Makefile        2006-02-02 17:09:58.000000000 +0000
-@@ -34,6 +34,7 @@ obj-$(CONFIG_ACPI_SRAT)      += srat.o
- obj-$(CONFIG_HPET_TIMER)      += time_hpet.o
- obj-$(CONFIG_EFI)             += efi.o efi_stub.o
- obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
-+obj-$(CONFIG_SMP_ALTERNATIVES)  += smpalts.o
- EXTRA_AFLAGS   := -traditional
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/smpalts.c ./arch/i386/kernel/smpalts.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/smpalts.c        1970-01-01 01:00:00.000000000 +0100
-+++ ./arch/i386/kernel/smpalts.c       2006-02-02 17:09:58.000000000 +0000
-@@ -0,0 +1,85 @@
-+#include <linux/kernel.h>
-+#include <asm/system.h>
-+#include <asm/smp_alt.h>
-+#include <asm/processor.h>
-+#include <asm/string.h>
-+
-+struct smp_replacement_record {
-+      unsigned char targ_size;
-+      unsigned char smp1_size;
-+      unsigned char smp2_size;
-+      unsigned char up_size;
-+      unsigned char feature;
-+      unsigned char data[0];
-+};
-+
-+struct smp_alternative_record {
-+      void *targ_start;
-+      struct smp_replacement_record *repl;
-+};
-+
-+extern struct smp_alternative_record __start_smp_alternatives_table,
-+  __stop_smp_alternatives_table;
-+extern unsigned long __init_begin, __init_end;
-+
-+void prepare_for_smp(void)
-+{
-+      struct smp_alternative_record *r;
-+      printk(KERN_INFO "Enabling SMP...\n");
-+      for (r = &__start_smp_alternatives_table;
-+           r != &__stop_smp_alternatives_table;
-+           r++) {
-+              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+              BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+              if (r->repl->feature != (unsigned char)-1 &&
-+                  boot_cpu_has(r->repl->feature)) {
-+                      memcpy(r->targ_start,
-+                             r->repl->data + r->repl->smp1_size,
-+                             r->repl->smp2_size);
-+                      memset(r->targ_start + r->repl->smp2_size,
-+                             0x90,
-+                             r->repl->targ_size - r->repl->smp2_size);
-+              } else {
-+                      memcpy(r->targ_start,
-+                             r->repl->data,
-+                             r->repl->smp1_size);
-+                      memset(r->targ_start + r->repl->smp1_size,
-+                             0x90,
-+                             r->repl->targ_size - r->repl->smp1_size);
-+              }
-+      }
-+      /* Paranoia */
-+      asm volatile ("jmp 1f\n1:");
-+      mb();
-+}
-+
-+void unprepare_for_smp(void)
-+{
-+      struct smp_alternative_record *r;
-+      printk(KERN_INFO "Disabling SMP...\n");
-+      for (r = &__start_smp_alternatives_table;
-+           r != &__stop_smp_alternatives_table;
-+           r++) {
-+              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+              BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+              memcpy(r->targ_start,
-+                     r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
-+                     r->repl->up_size);
-+              memset(r->targ_start + r->repl->up_size,
-+                     0x90,
-+                     r->repl->targ_size - r->repl->up_size);
-+      }
-+      /* Paranoia */
-+      asm volatile ("jmp 1f\n1:");
-+      mb();
-+}
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/smpboot.c ./arch/i386/kernel/smpboot.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/smpboot.c        2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/smpboot.c       2006-02-02 17:09:58.000000000 +0000
-@@ -1212,6 +1212,11 @@ static void __init smp_boot_cpus(unsigne
-               if (max_cpus <= cpucount+1)
-                       continue;
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+              if (kicked == 1)
-+                      prepare_for_smp();
-+#endif
-+
-               if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
-                       printk("CPU #%d not responding - cannot use it.\n",
-                                                               apicid);
-@@ -1390,6 +1395,11 @@ int __devinit __cpu_up(unsigned int cpu)
-               return -EIO;
-       }
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+      if (num_online_cpus() == 1)
-+              prepare_for_smp();
-+#endif
-+
-       local_irq_enable();
-       per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
-       /* Unleash the CPU! */
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S
---- ../pristine-linux-2.6.15/arch/i386/kernel/vmlinux.lds.S    2006-01-03 03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/vmlinux.lds.S   2006-02-02 17:09:58.000000000 +0000
-@@ -34,6 +34,13 @@ SECTIONS
-   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
-   __stop___ex_table = .;
-+  . = ALIGN(16);
-+  __start_smp_alternatives_table = .;
-+  __smp_alternatives : { *(__smp_alternatives) }
-+  __stop_smp_alternatives_table = .;
-+
-+  __smp_replacements : { *(__smp_replacements) }
-+
-   RODATA
-   /* writeable */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/atomic.h ./include/asm-i386/atomic.h
---- ../pristine-linux-2.6.15/include/asm-i386/atomic.h 2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/atomic.h        2006-02-02 17:09:58.000000000 +0000
-@@ -4,18 +4,13 @@
- #include <linux/config.h>
- #include <linux/compiler.h>
- #include <asm/processor.h>
-+#include <asm/smp_alt.h>
- /*
-  * Atomic operations that C can't guarantee us.  Useful for
-  * resource counting etc..
-  */
--#ifdef CONFIG_SMP
--#define LOCK "lock ; "
--#else
--#define LOCK ""
--#endif
--
- /*
-  * Make sure gcc doesn't try to be clever and move things around
-  * on us. We need to use _exactly_ the address the user gave us,
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/bitops.h ./include/asm-i386/bitops.h
---- ../pristine-linux-2.6.15/include/asm-i386/bitops.h 2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/bitops.h        2006-02-02 17:09:58.000000000 +0000
-@@ -7,6 +7,7 @@
- #include <linux/config.h>
- #include <linux/compiler.h>
-+#include <asm/smp_alt.h>
- /*
-  * These have to be done with inline assembly: that way the bit-setting
-@@ -16,12 +17,6 @@
-  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
-  */
--#ifdef CONFIG_SMP
--#define LOCK_PREFIX "lock ; "
--#else
--#define LOCK_PREFIX ""
--#endif
--
- #define ADDR (*(volatile long *) addr)
- /**
-@@ -41,7 +36,7 @@
-  */
- static inline void set_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btsl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol
-  */
- static inline void clear_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btrl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -121,7 +116,7 @@ static inline void __change_bit(int nr, 
-  */
- static inline void change_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btcl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n
- {
-       int oldbit;
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int
- {
-       int oldbit;
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in
- {
-       int oldbit;
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/futex.h ./include/asm-i386/futex.h
---- ../pristine-linux-2.6.15/include/asm-i386/futex.h  2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/futex.h 2006-02-02 17:12:29.000000000 +0000
-@@ -28,7 +28,7 @@
- "1:   movl    %2, %0\n\
-       movl    %0, %3\n"                                       \
-       insn "\n"                                               \
--"2:   " LOCK_PREFIX "cmpxchgl %3, %2\n\
-+"2:   " LOCK "cmpxchgl %3, %2\n\
-       jnz     1b\n\
- 3:    .section .fixup,\"ax\"\n\
- 4:    mov     %5, %1\n\
-@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op, 
- #endif
-               switch (op) {
-               case FUTEX_OP_ADD:
--                      __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret,
-+                      __futex_atomic_op1(LOCK "xaddl %0, %2", ret,
-                                          oldval, uaddr, oparg);
-                       break;
-               case FUTEX_OP_OR:
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/rwsem.h ./include/asm-i386/rwsem.h
---- ../pristine-linux-2.6.15/include/asm-i386/rwsem.h  2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/rwsem.h 2006-02-02 17:09:58.000000000 +0000
-@@ -40,6 +40,7 @@
- #include <linux/list.h>
- #include <linux/spinlock.h>
-+#include <asm/smp_alt.h>
- struct rwsem_waiter;
-@@ -99,7 +100,7 @@ static inline void __down_read(struct rw
- {
-       __asm__ __volatile__(
-               "# beginning down_read\n\t"
--LOCK_PREFIX   "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
-+LOCK          "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
-               "  js        2f\n\t" /* jump if we weren't granted the lock */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st
-               "  movl      %1,%2\n\t"
-               "  addl      %3,%2\n\t"
-               "  jle       2f\n\t"
--LOCK_PREFIX   "  cmpxchgl  %2,%0\n\t"
-+LOCK          "  cmpxchgl  %2,%0\n\t"
-               "  jnz       1b\n\t"
-               "2:\n\t"
-               "# ending __down_read_trylock\n\t"
-@@ -150,7 +151,7 @@ static inline void __down_write(struct r
-       tmp = RWSEM_ACTIVE_WRITE_BIAS;
-       __asm__ __volatile__(
-               "# beginning down_write\n\t"
--LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
-+LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
-               "  testl     %%edx,%%edx\n\t" /* was the count 0 before? */
-               "  jnz       2f\n\t" /* jump if we weren't granted the lock */
-               "1:\n\t"
-@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s
-       __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
-       __asm__ __volatile__(
-               "# beginning __up_read\n\t"
--LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
-+LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
-               "  js        2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_
-       __asm__ __volatile__(
-               "# beginning __up_write\n\t"
-               "  movl      %2,%%edx\n\t"
--LOCK_PREFIX   "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
-+LOCK          "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
-               "  jnz       2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -239,7 +240,7 @@ static inline void __downgrade_write(str
- {
-       __asm__ __volatile__(
-               "# beginning __downgrade_write\n\t"
--LOCK_PREFIX   "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
-+LOCK          "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
-               "  js        2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -263,7 +264,7 @@ LOCK_PREFIX        "  addl      %2,(%%eax)\n\t"
- static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
- {
-       __asm__ __volatile__(
--LOCK_PREFIX   "addl %1,%0"
-+LOCK            "addl %1,%0"
-               : "=m"(sem->count)
-               : "ir"(delta), "m"(sem->count));
- }
-@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in
-       int tmp = delta;
-       __asm__ __volatile__(
--LOCK_PREFIX   "xadd %0,(%2)"
-+LOCK                    "xadd %0,(%2)"
-               : "+r"(tmp), "=m"(sem->count)
-               : "r"(sem), "m"(sem->count)
-               : "memory");
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/smp_alt.h ./include/asm-i386/smp_alt.h
---- ../pristine-linux-2.6.15/include/asm-i386/smp_alt.h        1970-01-01 01:00:00.000000000 +0100
-+++ ./include/asm-i386/smp_alt.h       2006-02-02 17:09:58.000000000 +0000
-@@ -0,0 +1,32 @@
-+#ifndef __ASM_SMP_ALT_H__
-+#define __ASM_SMP_ALT_H__
-+
-+#include <linux/config.h>
-+
-+#ifdef CONFIG_SMP
-+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
-+#define LOCK \
-+        "6677: nop\n" \
-+      ".section __smp_alternatives,\"a\"\n" \
-+      ".long 6677b\n" \
-+      ".long 6678f\n" \
-+      ".previous\n" \
-+      ".section __smp_replacements,\"a\"\n" \
-+      "6678: .byte 1\n" \
-+      ".byte 1\n" \
-+      ".byte 0\n" \
-+        ".byte 1\n" \
-+      ".byte -1\n" \
-+      "lock\n" \
-+      "nop\n" \
-+      ".previous\n"
-+void prepare_for_smp(void);
-+void unprepare_for_smp(void);
-+#else
-+#define LOCK "lock ; "
-+#endif
-+#else
-+#define LOCK ""
-+#endif
-+
-+#endif /* __ASM_SMP_ALT_H__ */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/spinlock.h ./include/asm-i386/spinlock.h
---- ../pristine-linux-2.6.15/include/asm-i386/spinlock.h       2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/spinlock.h      2006-02-02 17:09:58.000000000 +0000
-@@ -6,6 +6,7 @@
- #include <asm/page.h>
- #include <linux/config.h>
- #include <linux/compiler.h>
-+#include <asm/smp_alt.h>
- /*
-  * Your basic SMP spinlocks, allowing only a single CPU anywhere
-@@ -23,7 +24,8 @@
- #define __raw_spin_lock_string \
-       "\n1:\t" \
--      "lock ; decb %0\n\t" \
-+      LOCK \
-+      "decb %0\n\t" \
-       "jns 3f\n" \
-       "2:\t" \
-       "rep;nop\n\t" \
-@@ -34,7 +36,8 @@
- #define __raw_spin_lock_string_flags \
-       "\n1:\t" \
--      "lock ; decb %0\n\t" \
-+      LOCK \
-+      "decb %0\n\t" \
-       "jns 4f\n\t" \
-       "2:\t" \
-       "testl $0x200, %1\n\t" \
-@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags
- static inline int __raw_spin_trylock(raw_spinlock_t *lock)
- {
-       char oldval;
-+#ifdef CONFIG_SMP_ALTERNATIVES
-       __asm__ __volatile__(
--              "xchgb %b0,%1"
-+              "1:movb %1,%b0\n"
-+              "movb $0,%1\n"
-+              "2:"
-+              ".section __smp_alternatives,\"a\"\n"
-+              ".long 1b\n"
-+              ".long 3f\n"
-+              ".previous\n"
-+              ".section __smp_replacements,\"a\"\n"
-+              "3: .byte 2b - 1b\n"
-+              ".byte 5f-4f\n"
-+              ".byte 0\n"
-+              ".byte 6f-5f\n"
-+              ".byte -1\n"
-+              "4: xchgb %b0,%1\n"
-+              "5: movb %1,%b0\n"
-+              "movb $0,%1\n"
-+              "6:\n"
-+              ".previous\n"
-               :"=q" (oldval), "=m" (lock->slock)
-               :"0" (0) : "memory");
-+#else
-+      __asm__ __volatile__(
-+              "xchgb %b0,%1\n"
-+              :"=q" (oldval), "=m" (lock->slock)
-+              :"0" (0) : "memory");
-+#endif
-       return oldval > 0;
- }
-@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra
- static inline void __raw_read_unlock(raw_rwlock_t *rw)
- {
--      asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory");
-+      asm volatile(LOCK "incl %0" :"=m" (rw->lock) : : "memory");
- }
- static inline void __raw_write_unlock(raw_rwlock_t *rw)
- {
--      asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ", %0"
-+      asm volatile(LOCK "addl $" RW_LOCK_BIAS_STR ", %0"
-                                : "=m" (rw->lock) : : "memory");
- }
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/system.h ./include/asm-i386/system.h
---- ../pristine-linux-2.6.15/include/asm-i386/system.h 2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/system.h        2006-02-02 17:10:47.000000000 +0000
-@@ -5,7 +5,7 @@
- #include <linux/kernel.h>
- #include <asm/segment.h>
- #include <asm/cpufeature.h>
--#include <linux/bitops.h> /* for LOCK_PREFIX */
-+#include <asm/smp_alt.h>
- #ifdef __KERNEL__
-@@ -274,19 +274,19 @@ static inline unsigned long __cmpxchg(vo
-       unsigned long prev;
-       switch (size) {
-       case 1:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgb %b1,%2"
-                                    : "=a"(prev)
-                                    : "q"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-               return prev;
-       case 2:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgw %w1,%2"
-                                    : "=a"(prev)
-                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-               return prev;
-       case 4:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgl %1,%2"
-                                    : "=a"(prev)
-                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-@@ -339,7 +339,7 @@ static inline unsigned long long __cmpxc
-                                     unsigned long long new)
- {
-       unsigned long long prev;
--      __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3"
-+      __asm__ __volatile__(LOCK "cmpxchg8b %3"
-                            : "=A"(prev)
-                            : "b"((unsigned long)new),
-                              "c"((unsigned long)(new >> 32)),
-@@ -506,11 +506,55 @@ struct alt_instr { 
- #endif
- #ifdef CONFIG_SMP
--#define smp_mb()      mb()
--#define smp_rmb()     rmb()
- #define smp_wmb()     wmb()
--#define smp_read_barrier_depends()    read_barrier_depends()
-+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
-+#define smp_alt_mb(instr)                                           \
-+__asm__ __volatile__("6667:\nnop\nnop\nnop\nnop\nnop\nnop\n6668:\n" \
-+                   ".section __smp_alternatives,\"a\"\n"          \
-+                   ".long 6667b\n"                                \
-+                     ".long 6673f\n"                                \
-+                   ".previous\n"                                  \
-+                   ".section __smp_replacements,\"a\"\n"          \
-+                   "6673:.byte 6668b-6667b\n"                     \
-+                   ".byte 6670f-6669f\n"                          \
-+                   ".byte 6671f-6670f\n"                          \
-+                     ".byte 0\n"                                    \
-+                   ".byte %c0\n"                                  \
-+                   "6669:lock;addl $0,0(%%esp)\n"                 \
-+                   "6670:" instr "\n"                             \
-+                   "6671:\n"                                      \
-+                   ".previous\n"                                  \
-+                   :                                              \
-+                   : "i" (X86_FEATURE_XMM2)                       \
-+                   : "memory")
-+#define smp_rmb() smp_alt_mb("lfence")
-+#define smp_mb()  smp_alt_mb("mfence")
-+#define set_mb(var, value) do {                                     \
-+unsigned long __set_mb_temp;                                        \
-+__asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \
-+                   ".section __smp_alternatives,\"a\"\n"          \
-+                   ".long 6667b\n"                                \
-+                   ".long 6673f\n"                                \
-+                   ".previous\n"                                  \
-+                   ".section __smp_replacements,\"a\"\n"          \
-+                   "6673: .byte 6668b-6667b\n"                    \
-+                   ".byte 6670f-6669f\n"                          \
-+                   ".byte 0\n"                                    \
-+                   ".byte 6671f-6670f\n"                          \
-+                   ".byte -1\n"                                   \
-+                   "6669: xchg %1, %0\n"                          \
-+                   "6670:movl %1, %0\n"                           \
-+                   "6671:\n"                                      \
-+                   ".previous\n"                                  \
-+                   : "=m" (var), "=r" (__set_mb_temp)             \
-+                   : "1" (value)                                  \
-+                   : "memory"); } while (0)
-+#else
-+#define smp_rmb()     rmb()
-+#define smp_mb()      mb()
- #define set_mb(var, value) do { xchg(&var, value); } while (0)
-+#endif
-+#define smp_read_barrier_depends()    read_barrier_depends()
- #else
- #define smp_mb()      barrier()
- #define smp_rmb()     barrier()
diff --git a/patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch b/patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch
new file mode 100644 (file)
index 0000000..fddb891
--- /dev/null
@@ -0,0 +1,45 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/traps.c 2006-02-02 17:39:29.000000000 +0000
++++ ./arch/i386/kernel/traps.c 2006-02-02 17:43:01.000000000 +0000
+@@ -564,18 +564,11 @@ static void mem_parity_error(unsigned ch
+ static void io_check_error(unsigned char reason, struct pt_regs * regs)
+ {
+-      unsigned long i;
+-
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
+       show_registers(regs);
+       /* Re-enable the IOCK line, wait for a few seconds */
+-      reason = (reason & 0xf) | 8;
+-      outb(reason, 0x61);
+-      i = 2000;
+-      while (--i) udelay(1000);
+-      reason &= ~8;
+-      outb(reason, 0x61);
++      clear_io_check_error(reason);
+ }
+ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/mach-default/mach_traps.h       2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/mach-default/mach_traps.h       2006-02-02 17:41:55.000000000 +0000
+@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
+       outb(reason, 0x61);
+ }
++static inline void clear_io_check_error(unsigned char reason)
++{
++      unsigned long i;
++
++      reason = (reason & 0xf) | 8;
++      outb(reason, 0x61);
++      i = 2000;
++      while (--i) udelay(1000);
++      reason &= ~8;
++      outb(reason, 0x61);
++}
++
+ static inline unsigned char get_nmi_reason(void)
+ {
+       return inb(0x61);
diff --git a/patches/linux-2.6.16-rc1-git4/net-csum.patch b/patches/linux-2.6.16-rc1-git4/net-csum.patch
new file mode 100644 (file)
index 0000000..a1b4a24
--- /dev/null
@@ -0,0 +1,46 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
+--- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c    2006-02-02 17:39:51.000000000 +0000
++++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c    2006-02-02 17:44:18.000000000 +0000
+@@ -129,10 +129,16 @@ tcp_manip_pkt(struct sk_buff **pskb,
+       if (hdrsize < sizeof(*hdr))
+               return 1;
+-      hdr->check = ip_nat_cheat_check(~oldip, newip,
++      if ((*pskb)->proto_csum_blank) {
++              hdr->check = ip_nat_cheat_check(oldip, ~newip,
++                              ip_nat_cheat_check(oldport ^ 0xFFFF,
++                                      newport, hdr->check));
++      } else { 
++              hdr->check = ip_nat_cheat_check(~oldip, newip,
+                                       ip_nat_cheat_check(oldport ^ 0xFFFF,
+                                                          newport,
+                                                          hdr->check));
++      }
+       return 1;
+ }
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
+--- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c    2006-02-02 17:39:51.000000000 +0000
++++ ./net/ipv4/netfilter/ip_nat_proto_udp.c    2006-02-02 17:44:18.000000000 +0000
+@@ -113,11 +113,19 @@ udp_manip_pkt(struct sk_buff **pskb,
+               newport = tuple->dst.u.udp.port;
+               portptr = &hdr->dest;
+       }
+-      if (hdr->check) /* 0 is a special case meaning no checksum */
+-              hdr->check = ip_nat_cheat_check(~oldip, newip,
++      
++      if (hdr->check) { /* 0 is a special case meaning no checksum */
++              if ((*pskb)->proto_csum_blank) {
++                      hdr->check = ip_nat_cheat_check(oldip, ~newip, 
++                                      ip_nat_cheat_check(*portptr ^ 0xFFFF, 
++                                              newport, hdr->check));
++              } else {
++                      hdr->check = ip_nat_cheat_check(~oldip, newip,
+                                       ip_nat_cheat_check(*portptr ^ 0xFFFF,
+                                                          newport,
+                                                          hdr->check));
++              }
++      }
+       *portptr = newport;
+       return 1;
+ }
diff --git a/patches/linux-2.6.16-rc1-git4/pmd-shared.patch b/patches/linux-2.6.16-rc1-git4/pmd-shared.patch
new file mode 100644 (file)
index 0000000..3764a32
--- /dev/null
@@ -0,0 +1,111 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pageattr.c  2006-02-02 17:39:29.000000000 +0000
++++ ./arch/i386/mm/pageattr.c  2006-02-02 17:45:14.000000000 +0000
+@@ -78,7 +78,7 @@ static void set_pmd_pte(pte_t *kpte, uns
+       unsigned long flags;
+       set_pte_atomic(kpte, pte);      /* change init_mm */
+-      if (PTRS_PER_PMD > 1)
++      if (HAVE_SHARED_KERNEL_PMD)
+               return;
+       spin_lock_irqsave(&pgd_lock, flags);
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pgtable.c   2006-01-03 03:21:10.000000000 +0000
++++ ./arch/i386/mm/pgtable.c   2006-02-02 17:45:14.000000000 +0000
+@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
+               spin_lock_irqsave(&pgd_lock, flags);
+       }
+-      clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
+-                      swapper_pg_dir + USER_PTRS_PER_PGD,
+-                      KERNEL_PGD_PTRS);
++      if (PTRS_PER_PMD == 1 || HAVE_SHARED_KERNEL_PMD)
++              clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
++                              swapper_pg_dir + USER_PTRS_PER_PGD,
++                              KERNEL_PGD_PTRS);
+       if (PTRS_PER_PMD > 1)
+               return;
+@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+                       goto out_oom;
+               set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
+       }
++
++      if (!HAVE_SHARED_KERNEL_PMD) {
++              unsigned long flags;
++
++              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                      pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
++                      if (!pmd)
++                              goto out_oom;
++                      set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
++              }
++
++              spin_lock_irqsave(&pgd_lock, flags);
++              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                      unsigned long v = (unsigned long)i << PGDIR_SHIFT;
++                      pgd_t *kpgd = pgd_offset_k(v);
++                      pud_t *kpud = pud_offset(kpgd, v);
++                      pmd_t *kpmd = pmd_offset(kpud, v);
++                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                      memcpy(pmd, kpmd, PAGE_SIZE);
++              }
++              pgd_list_add(pgd);
++              spin_unlock_irqrestore(&pgd_lock, flags);
++      }
++
+       return pgd;
+ out_oom:
+@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
+       int i;
+       /* in the PAE case user pgd entries are overwritten before usage */
+-      if (PTRS_PER_PMD > 1)
+-              for (i = 0; i < USER_PTRS_PER_PGD; ++i)
+-                      kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1));
++      if (PTRS_PER_PMD > 1) {
++              for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
++                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                      kmem_cache_free(pmd_cache, pmd);
++              }
++              if (!HAVE_SHARED_KERNEL_PMD) {
++                      unsigned long flags;
++                      spin_lock_irqsave(&pgd_lock, flags);
++                      pgd_list_del(pgd);
++                      spin_unlock_irqrestore(&pgd_lock, flags);
++                      for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                              pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                              memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
++                              kmem_cache_free(pmd_cache, pmd);
++                      }
++              }
++      }
+       /* in the non-PAE case, free_pgtables() clears user pgd entries */
+       kmem_cache_free(pgd_cache, pgd);
+ }
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-2level-defs.h   2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/pgtable-2level-defs.h   2006-02-02 17:45:14.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+ #define _I386_PGTABLE_2LEVEL_DEFS_H
++#define HAVE_SHARED_KERNEL_PMD 0
++
+ /*
+  * traditional i386 two-level paging structure:
+  */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-3level-defs.h   2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/pgtable-3level-defs.h   2006-02-02 17:45:14.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+ #define _I386_PGTABLE_3LEVEL_DEFS_H
++#define HAVE_SHARED_KERNEL_PMD 1
++
+ /*
+  * PGDIR_SHIFT determines what a top-level page table entry can map
+  */
diff --git a/patches/linux-2.6.16-rc1-git4/smp-alts.patch b/patches/linux-2.6.16-rc1-git4/smp-alts.patch
new file mode 100644 (file)
index 0000000..87f563f
--- /dev/null
@@ -0,0 +1,593 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/Kconfig ./arch/i386/Kconfig
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/Kconfig        2006-02-02 17:39:28.000000000 +0000
++++ ./arch/i386/Kconfig        2006-02-02 17:45:59.000000000 +0000
+@@ -211,6 +211,19 @@ config SMP
+         If you don't know what to do here, say N.
++config SMP_ALTERNATIVES
++      bool "SMP alternatives support (EXPERIMENTAL)"
++      depends on SMP && EXPERIMENTAL
++      help
++        Try to reduce the overhead of running an SMP kernel on a uniprocessor
++        host slightly by replacing certain key instruction sequences
++        according to whether we currently have more than one CPU available.
++        This should provide a noticeable boost to performance when
++        running SMP kernels on UP machines, and have negligible impact
++        when running on an true SMP host.
++
++          If unsure, say N.
++        
+ config NR_CPUS
+       int "Maximum number of CPUs (2-255)"
+       range 2 255
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/Makefile ./arch/i386/kernel/Makefile
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/Makefile        2006-02-02 17:39:28.000000000 +0000
++++ ./arch/i386/kernel/Makefile        2006-02-02 17:45:59.000000000 +0000
+@@ -37,6 +37,7 @@ obj-$(CONFIG_EFI)            += efi.o efi_stub.o
+ obj-$(CONFIG_DOUBLEFAULT)     += doublefault.o
+ obj-$(CONFIG_VM86)            += vm86.o
+ obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
++obj-$(CONFIG_SMP_ALTERNATIVES)  += smpalts.o
+ EXTRA_AFLAGS   := -traditional
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpalts.c ./arch/i386/kernel/smpalts.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpalts.c       1970-01-01 01:00:00.000000000 +0100
++++ ./arch/i386/kernel/smpalts.c       2006-02-02 17:45:59.000000000 +0000
+@@ -0,0 +1,85 @@
++#include <linux/kernel.h>
++#include <asm/system.h>
++#include <asm/smp_alt.h>
++#include <asm/processor.h>
++#include <asm/string.h>
++
++struct smp_replacement_record {
++      unsigned char targ_size;
++      unsigned char smp1_size;
++      unsigned char smp2_size;
++      unsigned char up_size;
++      unsigned char feature;
++      unsigned char data[0];
++};
++
++struct smp_alternative_record {
++      void *targ_start;
++      struct smp_replacement_record *repl;
++};
++
++extern struct smp_alternative_record __start_smp_alternatives_table,
++  __stop_smp_alternatives_table;
++extern unsigned long __init_begin, __init_end;
++
++void prepare_for_smp(void)
++{
++      struct smp_alternative_record *r;
++      printk(KERN_INFO "Enabling SMP...\n");
++      for (r = &__start_smp_alternatives_table;
++           r != &__stop_smp_alternatives_table;
++           r++) {
++              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
++              if (r->repl->feature != (unsigned char)-1 &&
++                  boot_cpu_has(r->repl->feature)) {
++                      memcpy(r->targ_start,
++                             r->repl->data + r->repl->smp1_size,
++                             r->repl->smp2_size);
++                      memset(r->targ_start + r->repl->smp2_size,
++                             0x90,
++                             r->repl->targ_size - r->repl->smp2_size);
++              } else {
++                      memcpy(r->targ_start,
++                             r->repl->data,
++                             r->repl->smp1_size);
++                      memset(r->targ_start + r->repl->smp1_size,
++                             0x90,
++                             r->repl->targ_size - r->repl->smp1_size);
++              }
++      }
++      /* Paranoia */
++      asm volatile ("jmp 1f\n1:");
++      mb();
++}
++
++void unprepare_for_smp(void)
++{
++      struct smp_alternative_record *r;
++      printk(KERN_INFO "Disabling SMP...\n");
++      for (r = &__start_smp_alternatives_table;
++           r != &__stop_smp_alternatives_table;
++           r++) {
++              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
++              memcpy(r->targ_start,
++                     r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
++                     r->repl->up_size);
++              memset(r->targ_start + r->repl->up_size,
++                     0x90,
++                     r->repl->targ_size - r->repl->up_size);
++      }
++      /* Paranoia */
++      asm volatile ("jmp 1f\n1:");
++      mb();
++}
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpboot.c ./arch/i386/kernel/smpboot.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpboot.c       2006-02-02 17:39:29.000000000 +0000
++++ ./arch/i386/kernel/smpboot.c       2006-02-02 17:45:59.000000000 +0000
+@@ -1218,6 +1218,11 @@ static void __init smp_boot_cpus(unsigne
+               if (max_cpus <= cpucount+1)
+                       continue;
++#ifdef CONFIG_SMP_ALTERNATIVES
++              if (kicked == 1)
++                      prepare_for_smp();
++#endif
++
+               if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
+                       printk("CPU #%d not responding - cannot use it.\n",
+                                                               apicid);
+@@ -1396,6 +1401,11 @@ int __devinit __cpu_up(unsigned int cpu)
+               return -EIO;
+       }
++#ifdef CONFIG_SMP_ALTERNATIVES
++      if (num_online_cpus() == 1)
++              prepare_for_smp();
++#endif
++
+       local_irq_enable();
+       per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
+       /* Unleash the CPU! */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/vmlinux.lds.S   2006-01-03 03:21:10.000000000 +0000
++++ ./arch/i386/kernel/vmlinux.lds.S   2006-02-02 17:45:59.000000000 +0000
+@@ -34,6 +34,13 @@ SECTIONS
+   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
+   __stop___ex_table = .;
++  . = ALIGN(16);
++  __start_smp_alternatives_table = .;
++  __smp_alternatives : { *(__smp_alternatives) }
++  __stop_smp_alternatives_table = .;
++
++  __smp_replacements : { *(__smp_replacements) }
++
+   RODATA
+   /* writeable */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/atomic.h ./include/asm-i386/atomic.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/atomic.h        2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/atomic.h        2006-02-02 17:45:59.000000000 +0000
+@@ -4,18 +4,13 @@
+ #include <linux/config.h>
+ #include <linux/compiler.h>
+ #include <asm/processor.h>
++#include <asm/smp_alt.h>
+ /*
+  * Atomic operations that C can't guarantee us.  Useful for
+  * resource counting etc..
+  */
+-#ifdef CONFIG_SMP
+-#define LOCK "lock ; "
+-#else
+-#define LOCK ""
+-#endif
+-
+ /*
+  * Make sure gcc doesn't try to be clever and move things around
+  * on us. We need to use _exactly_ the address the user gave us,
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/bitops.h ./include/asm-i386/bitops.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/bitops.h        2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/bitops.h        2006-02-02 17:45:59.000000000 +0000
+@@ -7,6 +7,7 @@
+ #include <linux/config.h>
+ #include <linux/compiler.h>
++#include <asm/smp_alt.h>
+ /*
+  * These have to be done with inline assembly: that way the bit-setting
+@@ -16,12 +17,6 @@
+  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
+  */
+-#ifdef CONFIG_SMP
+-#define LOCK_PREFIX "lock ; "
+-#else
+-#define LOCK_PREFIX ""
+-#endif
+-
+ #define ADDR (*(volatile long *) addr)
+ /**
+@@ -41,7 +36,7 @@
+  */
+ static inline void set_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btsl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol
+  */
+ static inline void clear_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btrl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -121,7 +116,7 @@ static inline void __change_bit(int nr, 
+  */
+ static inline void change_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btcl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n
+ {
+       int oldbit;
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btsl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int
+ {
+       int oldbit;
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btrl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in
+ {
+       int oldbit;
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btcl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/futex.h ./include/asm-i386/futex.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/futex.h 2006-02-02 17:40:00.000000000 +0000
++++ ./include/asm-i386/futex.h 2006-02-02 17:45:59.000000000 +0000
+@@ -28,7 +28,7 @@
+ "1:   movl    %2, %0\n\
+       movl    %0, %3\n"                                       \
+       insn "\n"                                               \
+-"2:   " LOCK_PREFIX "cmpxchgl %3, %2\n\
++"2:   " LOCK "cmpxchgl %3, %2\n\
+       jnz     1b\n\
+ 3:    .section .fixup,\"ax\"\n\
+ 4:    mov     %5, %1\n\
+@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op, 
+ #endif
+               switch (op) {
+               case FUTEX_OP_ADD:
+-                      __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret,
++                      __futex_atomic_op1(LOCK "xaddl %0, %2", ret,
+                                          oldval, uaddr, oparg);
+                       break;
+               case FUTEX_OP_OR:
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/rwsem.h ./include/asm-i386/rwsem.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/rwsem.h 2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/rwsem.h 2006-02-02 17:45:59.000000000 +0000
+@@ -40,6 +40,7 @@
+ #include <linux/list.h>
+ #include <linux/spinlock.h>
++#include <asm/smp_alt.h>
+ struct rwsem_waiter;
+@@ -99,7 +100,7 @@ static inline void __down_read(struct rw
+ {
+       __asm__ __volatile__(
+               "# beginning down_read\n\t"
+-LOCK_PREFIX   "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
++LOCK          "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
+               "  js        2f\n\t" /* jump if we weren't granted the lock */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st
+               "  movl      %1,%2\n\t"
+               "  addl      %3,%2\n\t"
+               "  jle       2f\n\t"
+-LOCK_PREFIX   "  cmpxchgl  %2,%0\n\t"
++LOCK          "  cmpxchgl  %2,%0\n\t"
+               "  jnz       1b\n\t"
+               "2:\n\t"
+               "# ending __down_read_trylock\n\t"
+@@ -150,7 +151,7 @@ static inline void __down_write(struct r
+       tmp = RWSEM_ACTIVE_WRITE_BIAS;
+       __asm__ __volatile__(
+               "# beginning down_write\n\t"
+-LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
++LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
+               "  testl     %%edx,%%edx\n\t" /* was the count 0 before? */
+               "  jnz       2f\n\t" /* jump if we weren't granted the lock */
+               "1:\n\t"
+@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s
+       __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
+       __asm__ __volatile__(
+               "# beginning __up_read\n\t"
+-LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
++LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
+               "  js        2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_
+       __asm__ __volatile__(
+               "# beginning __up_write\n\t"
+               "  movl      %2,%%edx\n\t"
+-LOCK_PREFIX   "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
++LOCK          "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
+               "  jnz       2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -239,7 +240,7 @@ static inline void __downgrade_write(str
+ {
+       __asm__ __volatile__(
+               "# beginning __downgrade_write\n\t"
+-LOCK_PREFIX   "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
++LOCK          "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
+               "  js        2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -263,7 +264,7 @@ LOCK_PREFIX        "  addl      %2,(%%eax)\n\t"
+ static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
+ {
+       __asm__ __volatile__(
+-LOCK_PREFIX   "addl %1,%0"
++LOCK            "addl %1,%0"
+               : "=m"(sem->count)
+               : "ir"(delta), "m"(sem->count));
+ }
+@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in
+       int tmp = delta;
+       __asm__ __volatile__(
+-LOCK_PREFIX   "xadd %0,(%2)"
++LOCK                    "xadd %0,(%2)"
+               : "+r"(tmp), "=m"(sem->count)
+               : "r"(sem), "m"(sem->count)
+               : "memory");
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/smp_alt.h ./include/asm-i386/smp_alt.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/smp_alt.h       1970-01-01 01:00:00.000000000 +0100
++++ ./include/asm-i386/smp_alt.h       2006-02-02 17:45:59.000000000 +0000
+@@ -0,0 +1,32 @@
++#ifndef __ASM_SMP_ALT_H__
++#define __ASM_SMP_ALT_H__
++
++#include <linux/config.h>
++
++#ifdef CONFIG_SMP
++#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
++#define LOCK \
++        "6677: nop\n" \
++      ".section __smp_alternatives,\"a\"\n" \
++      ".long 6677b\n" \
++      ".long 6678f\n" \
++      ".previous\n" \
++      ".section __smp_replacements,\"a\"\n" \
++      "6678: .byte 1\n" \
++      ".byte 1\n" \
++      ".byte 0\n" \
++        ".byte 1\n" \
++      ".byte -1\n" \
++      "lock\n" \
++      "nop\n" \
++      ".previous\n"
++void prepare_for_smp(void);
++void unprepare_for_smp(void);
++#else
++#define LOCK "lock ; "
++#endif
++#else
++#define LOCK ""
++#endif
++
++#endif /* __ASM_SMP_ALT_H__ */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/spinlock.h ./include/asm-i386/spinlock.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/spinlock.h      2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/spinlock.h      2006-02-02 17:45:59.000000000 +0000
+@@ -6,6 +6,7 @@
+ #include <asm/page.h>
+ #include <linux/config.h>
+ #include <linux/compiler.h>
++#include <asm/smp_alt.h>
+ /*
+  * Your basic SMP spinlocks, allowing only a single CPU anywhere
+@@ -23,7 +24,8 @@
+ #define __raw_spin_lock_string \
+       "\n1:\t" \
+-      "lock ; decb %0\n\t" \
++      LOCK \
++      "decb %0\n\t" \
+       "jns 3f\n" \
+       "2:\t" \
+       "rep;nop\n\t" \
+@@ -34,7 +36,8 @@
+ #define __raw_spin_lock_string_flags \
+       "\n1:\t" \
+-      "lock ; decb %0\n\t" \
++      LOCK \
++      "decb %0\n\t" \
+       "jns 4f\n\t" \
+       "2:\t" \
+       "testl $0x200, %1\n\t" \
+@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags
+ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
+ {
+       char oldval;
++#ifdef CONFIG_SMP_ALTERNATIVES
+       __asm__ __volatile__(
+-              "xchgb %b0,%1"
++              "1:movb %1,%b0\n"
++              "movb $0,%1\n"
++              "2:"
++              ".section __smp_alternatives,\"a\"\n"
++              ".long 1b\n"
++              ".long 3f\n"
++              ".previous\n"
++              ".section __smp_replacements,\"a\"\n"
++              "3: .byte 2b - 1b\n"
++              ".byte 5f-4f\n"
++              ".byte 0\n"
++              ".byte 6f-5f\n"
++              ".byte -1\n"
++              "4: xchgb %b0,%1\n"
++              "5: movb %1,%b0\n"
++              "movb $0,%1\n"
++              "6:\n"
++              ".previous\n"
+               :"=q" (oldval), "=m" (lock->slock)
+               :"0" (0) : "memory");
++#else
++      __asm__ __volatile__(
++              "xchgb %b0,%1\n"
++              :"=q" (oldval), "=m" (lock->slock)
++              :"0" (0) : "memory");
++#endif
+       return oldval > 0;
+ }
+@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra
+ static inline void __raw_read_unlock(raw_rwlock_t *rw)
+ {
+-      asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory");
++      asm volatile(LOCK "incl %0" :"=m" (rw->lock) : : "memory");
+ }
+ static inline void __raw_write_unlock(raw_rwlock_t *rw)
+ {
+-      asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ", %0"
++      asm volatile(LOCK "addl $" RW_LOCK_BIAS_STR ", %0"
+                                : "=m" (rw->lock) : : "memory");
+ }
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/system.h ./include/asm-i386/system.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/system.h        2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/system.h        2006-02-02 17:45:59.000000000 +0000
+@@ -5,7 +5,7 @@
+ #include <linux/kernel.h>
+ #include <asm/segment.h>
+ #include <asm/cpufeature.h>
+-#include <linux/bitops.h> /* for LOCK_PREFIX */
++#include <asm/smp_alt.h>
+ #ifdef __KERNEL__
+@@ -271,19 +271,19 @@ static inline unsigned long __cmpxchg(vo
+       unsigned long prev;
+       switch (size) {
+       case 1:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgb %b1,%2"
+                                    : "=a"(prev)
+                                    : "q"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+               return prev;
+       case 2:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgw %w1,%2"
+                                    : "=a"(prev)
+                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+               return prev;
+       case 4:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgl %1,%2"
+                                    : "=a"(prev)
+                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+@@ -336,7 +336,7 @@ static inline unsigned long long __cmpxc
+                                     unsigned long long new)
+ {
+       unsigned long long prev;
+-      __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3"
++      __asm__ __volatile__(LOCK "cmpxchg8b %3"
+                            : "=A"(prev)
+                            : "b"((unsigned long)new),
+                              "c"((unsigned long)(new >> 32)),
+@@ -503,11 +503,55 @@ struct alt_instr { 
+ #endif
+ #ifdef CONFIG_SMP
+-#define smp_mb()      mb()
+-#define smp_rmb()     rmb()
+ #define smp_wmb()     wmb()
+-#define smp_read_barrier_depends()    read_barrier_depends()
++#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
++#define smp_alt_mb(instr)                                           \
++__asm__ __volatile__("6667:\nnop\nnop\nnop\nnop\nnop\nnop\n6668:\n" \
++                   ".section __smp_alternatives,\"a\"\n"          \
++                   ".long 6667b\n"                                \
++                     ".long 6673f\n"                                \
++                   ".previous\n"                                  \
++                   ".section __smp_replacements,\"a\"\n"          \
++                   "6673:.byte 6668b-6667b\n"                     \
++                   ".byte 6670f-6669f\n"                          \
++                   ".byte 6671f-6670f\n"                          \
++                     ".byte 0\n"                                    \
++                   ".byte %c0\n"                                  \
++                   "6669:lock;addl $0,0(%%esp)\n"                 \
++                   "6670:" instr "\n"                             \
++                   "6671:\n"                                      \
++                   ".previous\n"                                  \
++                   :                                              \
++                   : "i" (X86_FEATURE_XMM2)                       \
++                   : "memory")
++#define smp_rmb() smp_alt_mb("lfence")
++#define smp_mb()  smp_alt_mb("mfence")
++#define set_mb(var, value) do {                                     \
++unsigned long __set_mb_temp;                                        \
++__asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \
++                   ".section __smp_alternatives,\"a\"\n"          \
++                   ".long 6667b\n"                                \
++                   ".long 6673f\n"                                \
++                   ".previous\n"                                  \
++                   ".section __smp_replacements,\"a\"\n"          \
++                   "6673: .byte 6668b-6667b\n"                    \
++                   ".byte 6670f-6669f\n"                          \
++                   ".byte 0\n"                                    \
++                   ".byte 6671f-6670f\n"                          \
++                   ".byte -1\n"                                   \
++                   "6669: xchg %1, %0\n"                          \
++                   "6670:movl %1, %0\n"                           \
++                   "6671:\n"                                      \
++                   ".previous\n"                                  \
++                   : "=m" (var), "=r" (__set_mb_temp)             \
++                   : "1" (value)                                  \
++                   : "memory"); } while (0)
++#else
++#define smp_rmb()     rmb()
++#define smp_mb()      mb()
+ #define set_mb(var, value) do { xchg(&var, value); } while (0)
++#endif
++#define smp_read_barrier_depends()    read_barrier_depends()
+ #else
+ #define smp_mb()      barrier()
+ #define smp_rmb()     barrier()